-
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
Top 20 Factors To Consider When Choosing CRM For Small Business | Salesforce
Small or mid-sized businesses are renovating our nation’s economic structure. They have delivered a huge contribution towards its enhancement by generating a magnitude of job…
Salesforce Health Cloud: Going Beyond Patient Records to Build Patient Relationships
Salesforce Health Cloud – In today’s digital era, Healthcare has changed a lot. And these changes are driven by three key factors – Consumer expectations,…
Popular Salesforce Videos
Salesforce On-Demand Administrator
Apphienz's On-demand Administrator delivers much more than the company's expectations. It is hands-on, makes the work easy, efficient and productive along with being available to…
Salesforce Summer 20 Dynamic Forms
Salesforce’s Summer ’20 Release Notes have now been published, we can now dive under the hood to see what the top features are! Historically, Summer…
Contact Deletion in Salesforce Marketing Cloud
Cameron Robert from Datarati talks through how the Contact Delete function works, how to use it, and a practical demo of how to build a…