Enabling Return Data
You can easily enable return data directly from a declarative messaging relationship.
You can view the return data status from the messaging relationship. When enabled, return data details are displayed below relationship mappings.
Prerequisites
Consider the following information before enabling return data for a relationship.
Custom Return Data Developer Names
Before you enable return data, you can create unique return data developer names on publications and subscriptions manually. If the fields are blank, Foundations generates these values automatically using the following information:
- The first three letters of the developer name of the associated registered product
- The relevant source or target object name
- A numerical increment, if necessary, to ensure the name is unique
For example, an automatically generated return data developer name for a Foundations billing document publication could be ERPBil, a second publication for the same object could be ERPBil1.
Child Mappings
It is possible to set up return data for child record mappings. To populate return data fields on child source records, you must create child mappings using specific record creation methods. Foundations only populates return data fields on child source records when the child mapping contains one of the following record creation methods:
- Update Matching
- Update Matching and Delete
This applies to all child mappings in the subscription hierarchy that contain a target child type of Default. For more information about target child types, see Splitting Source Data into Multiple Target Records.
Foundations always populates return data fields on child target records, regardless of the record creation method.
Permissions to Enable Return Data
To enable return data in Foundations, you must be assigned the FDN Core - Administrator permission set and one of the following profiles:
- Salesforce System Administrator
- A custom profile that contains the Modify Metadata and Customize Application system permissions
For more information about assigning permissions, see the Salesforce Help.
Enable Return Data
To activate return data for a declarative relationship:
- On the Message Types tab, click the name of the message type that contains the relationship you want to customize. The message type is displayed.
- In the Relationship & Mapping Details section, click Manage Return Data. A summary of the return data fields that will be created is displayed. Review this information and make a note of the field API names for future reference.
- To continue, click Confirm. Return data mapping details are visible when you view the messaging relationship.
- Update the relevant page layouts on the source and target objects to include the new fields, as required.
- Update the relevant users' permissions to provide view access to these fields.
- [Optional] If you want to customize the information that is displayed, update the labels and help text for the new linking fields. By default, the labels reference the source or target object name, as appropriate.Show more information.
The following table contains details of the return data fields that are created on the source and target objects when you enable return data.
Object Type
Field Name
Field Label
Description
Source and Target Objects
link_<Return Data Developer Name>_Id
Example: link_ERPBil_Id
<Source or Target Object Name>
Example:
Billing Document
Lookup to the related source or target record.
Source Object Only
link_<Return Data Developer Name>_State
Example: link_ERPBil_State
<Target Object Name> Status
Example:
Billing Document Status
Status of the process that updates the linked target record.
Source Object Only
link_<Return Data Developer Name>_Errors
Example: link_ERPBil_Errors
<Target Object Name> Errors
Example:
Billing Document Errors
Details of errors that occurred when updating the linked target record.
For more information about updating page layouts, editing field labels, and assigning permissions to users, see the Salesforce Help.
Updating Messaging Relationships
Making the following changes to publications or subscriptions can affect return data:
- Editing source or target objects on the relationship
- Updating child relationship mappings
- Editing return data developer names
If you make any of these changes after you have enabled return data, the return data status will display "Partially Enabled".
Updating source or target objects or their identifiers when return data is enabled can invalidate the process. To ensure that return data is correctly configured, manually delete any generated ID, status and error fields on the source and target objects that are associated with this relationship then re-enable return data. When you re-enable return data, new return data fields are generated automatically.
Ensure you update the relevant permissions and page layouts to include any new fields that display return data.