Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 4 Current »

When submitting data to Salesforce with S4S Experience Forms, it is possible that submissions will fail if Salesforce Duplicate Rules are implemented in Salesforce. Setting the following to S4SMapping.EnableDuplicateAllowSave to ‘true’ in configuration in \App_Config\Modules\S4S\S4S.config will force the record to be saved by ignoring any Salesforce Duplicate Rules.

Example

By default, Salesforce implements the following Standard Duplicate Rules - https://help.salesforce.com/articleView?id=duplicate_rules_standard_rules.htm&type=5

If you have a Contact with an email value of ‘john@doe.com’ and a Lead is submitted with an email value of ‘john@doe.com’ then by default, the submit action will fail because Salesforce will detect a duplicate and offer to match the existing Contact record. However, this can not be handled effectively in the Submit Action.

There are 3 courses of action to handle this in S4S Experience Forms:

  1. Set the S4SMapping.EnableDuplicateAllowSave configuration to ‘true’ in configuration in \App_Config\Modules\S4S\S4S.config:

    <!--Overide duplicate rules to create new object -->
    <setting name="S4SMapping.EnableDuplicateAllowSave" value="false"/>

  2. Configure the S4S Experience Forms error handling to email form values to enter manually into Salesforce so the duplicate rules can be applied. See the following link for more information - Error Handling

  3. Create a custom submit action and implement code to process the Salesforce record matches that are returned in the FailedSaveResults collection. See the following code sample for more information - Working with Salesforce Duplicate Rules

Next Step

Congratulations, you have finished installing this option.

  • No labels