Skip to main content Rejoignez-nous lors de l'événement TDX à San Francisco ou sur Salesforce+ les 5 et 6 mars pour la conférence des développeurs à l'ère des agents IA. Inscrivez-vous dès maintenant.
erreur

Une erreur est survenue. Réessayez.

Kindly assist in this challenge. I have executed the ContactAndLeadSearch Class code successfully without errors  but encountered an error when Checking the Challenge though my debug window showed a successful compilation.

 

The problem and my debug window is shown below: 

 

Create an Apex class that returns both contacts and leads based on a parameter.

To pass this challenge, create an Apex class that returns both contacts and leads that have first or last name matching the incoming parameter.

  • The Apex class must be called ContactAndLeadSearch and be in the public scope
  • The Apex class must have a public static method called searchContactsAndLeads
    • The method must accept an incoming string as a parameter
    • The method should then find any contact or lead that matches the string as part of either the first or last name
    • The method should finally use a return type of List<List< sObject>>
  • NOTE: Because SOSL indexes data for searching, you must create a Contact record and Lead record before checking this challenge. Both records must have the last name Smith. The challenge uses these records for the SOSL search

 

Write SOSL Queries Hands On Challenge

10 réponses
  1. 1 nov. 2024, 14:23

     The method should then find any account with rating hot or opportunity that matches the string as part of their name field in apex?

0/9000