Skip to main content Únase a nosotros en TDX, en San Francisco, o en Salesforce+ los días 5 y 6 de marzo en la conferencia para desarrolladores sobre la era de agentes de IA. Registrarse ahora.
error

Vaya, se ha producido un error. Inténtelo de nuevo.

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 respuestas
  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