-
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
Salesforce Education Cloud Winter '25 Highlights
The future of education is here, and Salesforce is leading the charge with its latest Winter '25 Education Cloud updates. These updates will revolutionize the…
Salesforce Interview Questions – Part 1
1. Give me an example of one admin part and one development part which is used in the current organisation. 2. What is the difference between…
Visualforce Pages in Salesforce | The Developer Guide
Visualforce Page In Salesforce Visualforce Page is just like HTML, i.e, It is a tag-based markup language. It allows developers to build sophisticated, user-custom interfaces.…
Popular Salesforce Videos
Simple Salesforce to Salesforce Data Migration Step by Step | 100% Salesforce Native App
How to Migrate Salesforce Data? Create Template: As the name suggests, this is just like a sandbox template; these templates store template lines & various…
Dreamforce 2020 FAQs | Dreamforce To You | Salesforce Event
As the COVID-19 situation continues to evolve, questions around virtual Dreamforce 2020 continue to increase and that's why we've gone ahead and answered all the…
Code Review in Salesforce
Code Review and Code Quality in Salesforce 0:00 Introduction 0:44 What is code review? 1:22 Why we need code review 3:33 Basic code review 4:12…