- Issue created by @camoa
- πΊπΈUnited States camoa
Get Salesforce Mapped Object action implemented and committed.
What it does: Load the Salesforce mapped object information for any Drupal entity. Provides the Salesforce ID, object type, and sync status needed for other Salesforce operations. Essential companion to the field retrieval action.
Key features:
- Uses MappedObjectStorage::loadByEntity() from Salesforce contrib
- Returns complete mapping information including sync status
- Supports multiple mappings (returns first by default)
- Optional filtering by specific mapping ID
- Provides sync timestamps and status information
Available tokens:
- Mapping status:
[token:is_mapped]
(1/0),[token:mapping_count]
- Salesforce data:
[token:salesforce_id]
,[token:salesforce_object_type]
(Contact, Lead, etc.) - Mapping info:
[token:mapping_id]
,[token:mapped_object_id]
- Sync status:
[token:last_sync_status]
(1/0),[token:last_sync_action]
(push_create, pull_update, etc.) - Other:
[token:salesforce_url]
(direct link),[token:entity_updated]
(timestamp)
Example usage:
- Entity view: Get mapping info when viewing any content
- Pre-sync check: Verify mapping exists before push/pull operations
- Chain with field retrieval: Use
[token:salesforce_id]
and[token:salesforce_object_type]
in subsequent actions - Multiple mappings: Access
[token:all_mappings]
array when entity has multiple mappings
Testing: Successfully tested with mapped and unmapped entities. Correctly retrieves Salesforce IDs, object types, and sync status. Works perfectly as input for field retrieval actions.
Files added/changed:
src/Plugin/Action/SalesforceGetMappedObject.php
(new action)config/schema/salesforce_eca.schema.yml
(configuration schema)
Now you can easily access Salesforce mapping information for any entity, enabling complete entity viewing workflows and sync status checks.
Automatically closed - issue fixed for 2 weeks with no activity.