Posts

Showing posts with the label EntityParticle

Salesforce EntityParticle

Image
Entity Particle  Represents each element of a field that can be presented in a user interface. Contrast EntityParticle with FieldDefinition, which represents each element of a field defined in the Metadata API. EntityParticle has parity with describe, which returns API-accessible fields only for an entity. EntityParticle Let's say there is a requirement to fetch all picklist fields along their label, API Name. SOQL query using Entity Particle  SELECT EntityParticle.DeveloperName, Label, Value, IsActive, EntityParticle.IsDependentPicklist, EntityParticle.FieldDefinition.ControllingFieldDefinition.DeveloperName FROM  PicklistValueInfo  WHERE EntityParticle.EntityDefinition.QualifiedApiName = 'Case'  AND EntityParticle.IsDependentPicklist = TRUE  ORDER BY EntityParticleId, Label Results Retrieve all the fields of the 'Phone' data type