In Spring 2021, Salesforce announced a new FIELDS()
function in SOQL.
Examples of FIELDS()
clause in SOQL
Query All Field at once
1 | SELECT FIELDS(ALL) FROM Lead LIMIT 200 |
Query All STANDARD Standard Fields
1 | SELECT FIELDS(STANDARD) FROM Lead
|
Query All CUSTOM Fields
1 | SELECT FIELDS(CUSTOM) FROM Lead LIMIT 200 |
Mix Standard Fields and FIELDS(CUSTOM)
1 | SELECT Email, FIELDS(CUSTOM) FROM Lead LIMIT 200
|
Mix Custom Fields and FIELDS(STANDARD)
1 | SELECT Custom_Field__c, FIELDS(STANDARD) FROM Lead |
Thanks for your visit to my Blog. If this post is helpful to you then share and follow to get a new coming SFDC4Students blog posts.
No comments:
Post a Comment