-
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
The Role of Salesforce Partners in Accelerating Agentic AI Adoption
Agentic AI continues to revolutionize enterprise operations faster than ever. The Salesforce platform plays a vital role in helping businesses direct this technological evolution. However,…
Essential Skills Every Salesforce Admin Should Have
Salesforce is rapidly gaining popularity as a strong ecosystem with its multiple offerings. Every organization that wants a strong tool or platform looks up to…
Email Templates in Salesforce Classic and How To Send Them For a Particular Record
Email Templates are designed for consistent mails so as to increase productivity. Before we discuss further about Email Templates, let us know about the required…
Popular Salesforce Videos
Understanding Approval Process in Salesforce | How to create an approval process?
In this video, Shrey discussed Approval Process in Salesforce in detail and also he covers the following topics: 1. What is Approval Process? 2. How…
Salesforce Surveys | Salesforce Tutorial Video
In this short video, we will demonstrate how to enable surveys to use for employees. You can also enable surveys for customers or external participants…
Salesforce Standard vs Custom Objects Explained
Salesforce, a leading customer relationship management (CRM) platform, offers both custom and standard objects to organize and manage data effectively. Standard objects are pre-built components…