-
How to Bypass Merge Operation for this specific scenario? (read description below)
I have a requirement in which system will allow to delete an account only when its related contacts status are inactive...if any of the contacts are active then it should throw an error message.. I have fulfilled this functionality by writing apex code on beforedelete event..My code is working fine but there is a standard functionality in Salesforce called as "Merging"........In that scenario when i merge two accounts,if loosing account contains active records then it is throwing me validation message...but I have to bypass my code when it comes to the merging....
Can anybody suggest me,how I bypass the code?
One thing I tried,note down the masterid of winning record and put in my condition where I can bypass the scenario..but when I merge the accounts then I am not able to get MasterID of Winiing record....I am not sure why this is happening???
Ideally I should get some ID of the merge operation
Log In to reply.
Popular Salesforce Blogs
No Code Salesforce Strategic Integration with DocuSign
Salesforce and DocuSign recently expanded its footprint of their worldwide strategic relationship to create integrated solutions that will help clients accelerate how agreements are facilitated…
Salesforce Configuration Vs Salesforce Customization and Their Best Practices
What Is Configuration In Salesforce? Salesforce design is everything you can do inside the CRM framework. This implies you can add another field to your…
Popular Salesforce Videos
Salesforce Lightning Tutorial | Build a Custom Lightning Home Page
This Salesforce Lightning Tutorial video by Edureka will help you understand what exactly is Salesforce lightning. It will also talk about some of the features…
4 Benefits of Salesforce Data Services (ETL)
When your enterprise needs to integrate data from a different application, Salesforce Data Services will help your company in Extracting, Transforming, and Loading the gathered…
Salesforce Talent Alliance Demo
Salesforce Talent Alliance connects employers to Salesforce candidates and brings new talent into the ecosystem, emphasizing building a diverse workforce that reflects society around the…