b2c-crm-sync icon indicating copy to clipboard operation
b2c-crm-sync copied to clipboard

Create and Deploy Your Duplicate Rules Fails. when force deployed results in error : SortOrder must be in sequential order from 1.

Open neeraj-jain01 opened this issue 3 years ago • 3 comments

-- Deploying the configured duplicate rules to the Salesforce Org -- Unable to deploy the duplicateRules to your Salesforce Org -- Please deploy the rules manually via the following SFDX command:

sfdx force:source:deploy -p "./src/sfdc/base/main/default/duplicateRules/"

npm run crm-sync:sf:duplicaterules ... -- Review the CLI output for details regarding possible errors -- If issues remain unresolved, consider creating the duplicateRules -- manually (see "src/sfdc/_templates/duplicateRules" for details)

CRM-SYNC | v0.9.0 | crm-sync:sf:duplicaterules: END

neeraj.jain@neerajjain-ltm b2c-crm-sync-master % sfdx force:source:deploy -p "./src/sfdc/base/main/default/duplicateRules/" *** Deploying v52.0 metadata with SOAP API v53.0 connection *** Deploy ID: 0Af5j00000BhOSACA3 SOURCE PROGRESS | ████████████████████████████████████████ | 2/2 Components

=== Component Failures [1] Type Name Problem ───── ──────────────────── ───────────────────────────────────────────── Error Contact.B2C_Commerce SortOrder must be in sequential order from 1.

ERROR running force:source:deploy: Deploy failed. neeraj.jain@neerajjain-ltm b2c-crm-sync-master %

neeraj-jain01 avatar Feb 11 '22 03:02 neeraj-jain01

 -- Unable to deploy the duplicateRules to your Salesforce Org
 -- Please deploy the rules manually via the following SFDX command:

    sfdx force:source:deploy -p "./src/sfdc/personaccounts/main/default/duplicateRules/"

 -- Review the CLI output for details regarding possible errors
 -- If issues remain unresolved, consider creating the duplicateRules
 -- manually (see "src/sfdc/_templates/duplicateRules" for details)
----------------------------------------------------------------------------
 CRM-SYNC | v0.9.0 | crm-sync:sf:duplicaterules: END
----------------------------------------------------------------------------
osapishchuk@osapish-ltmsol0 b2c-crm-sync % sfdx force:source:deploy -p "./src/sfdc/personaccounts/main/default/duplicateRules/"
*** Deploying v52.0 metadata with SOAP API v53.0 connection ***
Deploy ID: 0Af5j00000EwmJHCAZ
DEPLOY PROGRESS | ████████████████████████████████████████ | 1/1 Components

=== Component Failures [2]
Type   Name                                           Problem
─────  ─────────────────────────────────────────────  ─────────────────────────────────────────────────────────────────────
Error  Contact.B2C_Commerce_Standard_Person_Accounts  SortOrder must be in sequential order from 1.
Error  Contact.Standard_Contact_Duplicate_Rule        Contact.00N5j000000nLjG is not a valid condition field for : Contact.

ERROR running force:source:deploy:  Deploy failed.

Got the same issue when first run npm run crm-sync:sf:duplicaterules and after was asked to run sfdx force:source:deploy -p "./src/sfdc/personaccounts/main/default/duplicateRules/"

olegforce avatar Mar 15 '22 10:03 olegforce

@neeraj-jain01 getting the same issue, were you able to resolve?

ast-ccorciega avatar Sep 19 '22 15:09 ast-ccorciega

Doing an installation on another org, and got the same issue once again, but now the command that is recommended to fix it, is not working:

👾 >   sfdx force:source:deploy -p "./src/sfdc/base/main/default/duplicateRules/"
 ›   Warning: sfdx-cli update available from 7.142.1 to 7.182.1.
*** Deploying v56.0 metadata with SOAP API v53.0 connection ***
Deploy ID: 0AfDn00000BER8bKAH
DEPLOY PROGRESS | ████████████████████████████████████████ | 2/2 Components

=== Component Failures [1]
Type   Name                  Problem
─────  ────────────────────  ─────────────────────────────────────────────
Error  Contact.B2C_Commerce  SortOrder must be in sequential order from 1.

ERROR running force:source:deploy:  Deploy failed.

olegforce avatar Jan 03 '23 02:01 olegforce