function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Suman KuchSuman Kuch 

Change sets error on Duplicate rules

Hi,

I was trying to upload Dupicate Rules along with Correspondng Matching rules from partial SB to Full SB but got the following error while validating the Inbound change sets. basically the error is related to the duplicate rules order on a custom object. I wrote 3 rules on that object but no clue how to set the order.
 
AQAddress__c.Address_Duplicate_Matching_Rule	Duplicate Rule	0	0	SortOrder must be in sequential order from 1.

 
Best Answer chosen by Suman Kuch
jigarshahjigarshah
Suman,

You can use the Reorder link as highlighted in the snapshot below to set the order in which the specified Duplicate Rule is processed. By default, any newly created Duplicate Rule is always ordered last and hence processed last.

Processing Order in Duplicate Rules within Salesforce

In your case, it seems that there are multiple Duplicate Rules with the same sort order value specified which is restricitng your change set from being deployed. Hence, try specifying a max Sort Order value which is not present in the destination org and try redeploying. You can then manually edit the sequence of firing Duplicate Rules on your full Copy Sandbox using the Reorder link specified in the snapshot above.

Please mark this thread as SOLVED and answer as the BEST ANSWER if it helps address your issue.

All Answers

jigarshahjigarshah
Suman,

You can use the Reorder link as highlighted in the snapshot below to set the order in which the specified Duplicate Rule is processed. By default, any newly created Duplicate Rule is always ordered last and hence processed last.

Processing Order in Duplicate Rules within Salesforce

In your case, it seems that there are multiple Duplicate Rules with the same sort order value specified which is restricitng your change set from being deployed. Hence, try specifying a max Sort Order value which is not present in the destination org and try redeploying. You can then manually edit the sequence of firing Duplicate Rules on your full Copy Sandbox using the Reorder link specified in the snapshot above.

Please mark this thread as SOLVED and answer as the BEST ANSWER if it helps address your issue.
This was selected as the best answer
Suman KuchSuman Kuch
Hi jigarshah, thanks for your reply..
I saw destination org has one inactive duplicate rule and i'm deploying 3 are new rules, so could you tell me how to set the order in source org? so you want me to set 2,3,and 4?  In fact the existing rule in dest is not in source org. would that be a problem?
jigarshahjigarshah
In fact the existing rule in dest is not in source org. would that be a problem? Yes, that could be a problem. As long as you want to deploy to make modifications in the existing rule you would want to replicate it on the source org and then update and redeploy.

And the order can be set as 2, 3 and 4 provided there is already a criteria at order # 1.
Suman KuchSuman Kuch
Thanks for the clue jigarshah, I was able to fix it.
jigarshahjigarshah
Suman, I am glad I could help.