You need to sign in to do that
Don't have an account?
Lakshya Kanchan
Activate/Deactivate duplicate rules using apex or, SFDX CLI
Hi
I have to automate certain manual checking steps done in the Salesforce org.
e.g. checking whether Account object has a record type with a specific API name or, not.
For that I am making use of SFDX CLI & apex code (run using SFDX CLI) to automate the items.
My business requirement is to activate/deactivate duplicate rules using apex or, through any command of SFDX CLI.
I want your help/suggestions on how to perform it.
Regards,
Lakshya
I have to automate certain manual checking steps done in the Salesforce org.
e.g. checking whether Account object has a record type with a specific API name or, not.
For that I am making use of SFDX CLI & apex code (run using SFDX CLI) to automate the items.
My business requirement is to activate/deactivate duplicate rules using apex or, through any command of SFDX CLI.
I want your help/suggestions on how to perform it.
Regards,
Lakshya
To activate or deactivate Duplicate Rules using Apex, you can use the Metadata API.
Update the "My_Duplicate_Rule" in code with your actual duplicate rule name
Related: https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_duplicaterule.htm
To activate or deactivate Duplicate Rules using the SFDX CLI,try
If this information helps, please mark the answer as best. Thank you
Thanks for the quick response.
The SFDX CLI approach didnt work.
We are going with the MetadataService class approach for now.