Salesforce EntityParticle

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




Comments

Popular posts from this blog

Agentforce in Production: What Separates a Successful Deployment from an AI Demo

Introduction to Salesforce Agent Script: Build Predictable AI Agents

Salesforce Data Graphs - Best Practices, Limits & Guardrails — 2026 Edition