Showing posts with label SOQL. Show all posts
Showing posts with label SOQL. Show all posts

What is SOQL FIELDS() Functions in Salesforce - SOQL Basic | Salesforce Funda

Salesforce has introduced SOQL Fields functions. This new function lets us query all the Salesforce fields of the object, Before you would have to add various fields api names to the select to get their values

You can include any of these in the field list:

  • FIELDS(ALL) — select all the fields of an object.
  • FIELDS(CUSTOM) — select all the custom fields of an object.
  • FIELDS(STANDARD) — select all the standard fields of an object

What is Polymorphic Relationships(POLYMORPHIC FIELDS) in SOQL Queries - SOQL Basic | Salesforce Funda

 A polymorphic relationship is a relationship between objects where a referenced object can be one of several different types. For example, the Who relationship field of a Task can be a Contact or a Lead.

You can use SOQL queries that reference polymorphic fields in Apex to get results that depend on the object type referenced by the polymorphic field. 


One approach is to filter your results using the Type qualifier.