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?

1 Answer 1

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? Commented Aug 20, 2020 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. Commented Aug 20, 2020 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? Commented Aug 20, 2020 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. Commented Aug 20, 2020 at 16:23
  • any output on that testing? Commented Sep 16, 2020 at 11:56

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.