3

We have an integration with a third party site which requires an exact match for the Lead Name. When we have a new lead, we need to make a call out to this website.

In Trigger.new, Lead.Name is always null. True, I need to create an asynchronous process to make the callout and by the time the async process happens, there will be a completed record I could SOQL query to get the name.

But since SOQL queries are limited and I already have Lead.FirstName and Lead.LastName, do I really need to make that query?

Or would it be safe to just use lead.FirstName + ' ' + lead.LastName, as I'll already have these values?

5

The documentation on Lead seems pretty clear:

Name

Description
Concatenation of FirstName, MiddleName, LastName, and Suffix up to 203 characters, including whitespaces.

5
  • Cheers for the fast response. Can you please give me a link to this documentation? Also, will they always be in this order and separated by a single space? – Brian Kessler Aug 20 '20 at 16:01
  • 2
    I typed out the markdown syntax but forgot to actually include the link. Done. Pretty sure they will always be space joined in this order, yes. – Adrian Larson Aug 20 '20 at 16:03
  • Cheers again.... Also, could there be regional variations on that? I'm working for a German company and so far as I can tell, we don't seem to have the Middle Name or Suffix fields. Is there any chance some other fields might be used instead? – Brian Kessler Aug 20 '20 at 16:06
  • 1
    I would hope the documentation would indicate it to be locale specific were that the case. I can try to do some testing later. – Adrian Larson Aug 20 '20 at 16:23
  • any output on that testing? – Brian Kessler Sep 16 '20 at 11:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.