Newer Version Available
Considerations for Defining Platform Events
- Field-Level Security
- All platform event fields are read only by default, and you can’t restrict access to a particular field. Because platform events aren’t viewable in the Salesforce user interface and aren’t editable, field-level security permissions don’t apply.
- Platform Encryption
- Platform Encryption is not supported for Platform Event fields.
- Enforcement of Field Attributes
- Platform event records are validated to ensure that the attributes of their custom fields are enforced. Field attributes include the Required and Default attributes, the precision of number fields, and the maximum length of text fields.
- Permanent Deletion of Event Definitions
- When you delete an event definition, it’s permanently removed and can’t be restored. Before you delete the event definition, delete the associated triggers. Published events that use the definition are also deleted.
- Renaming Event Objects
- Before you rename an event, delete the associated triggers. If the event name is modified after clients have subscribed to notifications for this event, the subscribed clients must resubscribe to the updated topic. To resubscribe to the new event, add your trigger for the renamed event object.
- No Associated Tab
- Platform events don’t have an associated tab because you can’t view event records in the Salesforce user interface.
- No SOQL Support
- You can’t query event notifications using SOQL.
- No Record Page Support in Lightning App Builder
- When creating a record page in Lightning App Builder, platform events that you defined show up in the list of objects for the page. However, you can’t create a Lightning record page for platform events because event records aren’t available in the user interface.
- Platform Events in Package Uninstall
- When uninstalling a package with the option Save a copy of this package's data for 48 hours after uninstall enabled, platform events aren’t exported.
- No Support in Professional and Group Editions
- Platform events aren’t supported in Professional and Group Edition orgs. Installation of a package that contains platform event objects fails in those orgs.