-
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
Document Generation in Salesforce with Nintex DocGen via Apex Code
Hello All, Welcome to another part of Nintex Document Generation in salesforce and this gonna be code-based. Before going to dive into it, I request…
Resolution of Managed Packages - Salesforce DX Developer Guide
Working with Salesforce DX for the resolution of managed packages: First, we create an org and enable the DX version in it that is DEVHUB.…
Why Everyone Should Integrate SharePoint with Salesforce
SharePoint is one of the most popular document management platforms today. It is used by virtually all major enterprises since it ties in neatly with…
Popular Salesforce Videos
Salesforce Tutorial for Beginners: Profiles and Permission Set in Salesforce
Modules Covered in this Training 1. Configuration Custom objects in salesforce Standard Objects in salesforce Lookup, Master Detail and Many to Many relationship in salesforce…
In App Guidance | Salesforce Tutotial
In this video, we take a look at one of the new features from the Salesforce Summer '19 release - In-App Guidance. We explain what…
Predicted Job Growth of Salesforce Business Analysts
In this video, Ben Analyst predicts the potential future growth of Salesforce. He compares the growth of Salesforce to other companies' growth rates and also…