Useful Flow Objects to Build Dynamic Salesforce Flows

A practical guide to the Salesforce objects that make Flow automation flexible and robust — RecordType, Profile, CMDT, PermissionSet, Group, ContentDocument, EmailMessage, EntityDefinition, FieldDefinition, and UserRecordAccess.

Why these objects matter

Flows become far more powerful when they can query and manipulate Salesforce metadata and relationship objects. Instead of hardcoding IDs or creating brittle automation, use the platform objects below to build configurable, maintainable, and dynamic Flows that adapt to org changes.

Key objects and how to use them

  • RecordType (RecordType) — Query by Name or DeveloperName using Get Records to avoid hardcoded Record Type Ids. Useful when creating records or presenting record-type-based choices.
  • Profile (Profile) — Retrieve profiles by Name to avoid hardcoding Profile Ids; check UserType when needed.
  • CurrencyType (CurrencyType) — When multi-currency is enabled, Get Records returns available currencies; loop through the collection to create PricebookEntries per ISO code.
  • Custom Metadata Types / Custom Settings (CMDT / CS) — Use Get Records to query CMDT/CS as if they were custom objects. For hierarchy custom settings, consider $Setup where applicable.
  • PermissionSet & PermissionSetAssignment — Create or delete PermissionSetAssignment records to assign/unassign Permission Sets to users (AssigneeId on PSA).
  • Group & GroupMember — Public Groups and Queues live on the Group object; use GroupMember to connect users to groups. Filter by Type to differentiate queues vs groups.
  • ContentDocument & ContentDocumentLink — ContentDocument stores the file; ContentDocumentLink connects the file to records, users, or groups.
  • EmailMessage & EmailMessageRelation — EmailMessage is the email record; use EmailMessageRelation to link to human records (Lead/Contact/User). Use fields like ParentId, RelatedToId, RelationId, RelationObjectType, and RelationType.
  • EntityDefinition — Metadata about objects. Use for dynamic picklists (Record Choice Set) so users can choose objects; note Record Choice Set limits (max 200 options).
  • FieldDefinition — Metadata about fields. Useful when building UI that lets users pick fields or when validating field-level properties.
  • FieldPermission — Maps permissions to Permission Sets and Profiles; useful for audits and conditional flow logic based on field-level access.
  • UserRecordAccess — Check a user’s access to a specific record. Note: in some Flow builders Get Records on this object may be restricted; SOQL or an Apex invocable may be required in those cases.

Best practices

  • Avoid hardcoding IDs — query the platform objects (RecordType, Profile, PermissionSet, etc.) instead.
  • Visualize unknown objects in a Screen element while learning — display their fields to understand their data.
  • Use Record Choice Sets with EntityDefinition and FieldDefinition for dynamic admin tools, but respect the 200-option limit.
  • When Flow Get Records cannot return a needed field (e.g., some UserRecordAccess scenarios), use SOQL via Apex invocable to safely return values to Flow.
  • Document common queries in a shared CMDT or metadata so admins can reuse logic without rebuilding Flows.

Use cases

Examples where these objects are particularly useful:

  • Automatically assign Permission Sets to users who enter a role via a Flow using PermissionSetAssignment.
  • Create PricebookEntries across all active currencies using CurrencyType.
  • Allow admins to select objects and fields dynamically in a Flow-driven data export tool using EntityDefinition and FieldDefinition.
  • Attach files to multiple records programmatically by creating ContentDocumentLink records.

Conclusion — Why this matters

Understanding and using these platform objects turns Flows from simple point automations into flexible, enterprise-ready tools. For Salesforce admins and developers, this reduces maintenance, prevents hardcoded logic, and enables self-service admin tooling that scales with the org.

Tags: RecordType, Profile, Custom Metadata, PermissionSet, Group, ContentDocument, EmailMessage, EntityDefinition, FieldDefinition, UserRecordAccess

For more, please follow our page!