Can anyone explain what is meant by this statement:
The RETURNING clause is optional via the API, but required via Apex code.
All I see from the docs is that the returning clause is optional.
Salesforce Stack Exchange is a question and answer site for Salesforce administrators, implementation experts, developers and anybody in-between. It only takes a minute to sign up.Sign up to join this community
Apex Code requires it to reduce the amount of resources used by the SOSL call. It is optional for the API; in that case, it returns all instances found across all objects within the limits.