-
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
5 Best Accounting Tools for Salesforce Businesses
Best accounting software is a critical component for any company. Whether you're a startup or have a more established presence, you need efficiency. Handling everyday…
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…
What is The Use of Test Class in Salesforce | Developer Guide
Test Class Testing is an important part of the Software Development Life Cycle (SDLC). Before moving the code in production, Salesforce ensures that your code…
Popular Salesforce Videos
How to get a job in Salesforce industry or ecosystem? (For freshers) | 7 Step Guide
The most common question that is asked: How do I get a job? I have learned Salesforce and I know how to create applications on…
Exploring Salesforce composite Resources | Composite API
Exploring Salesforce composite Resources-- 0:00 Introduction 1:30 What is Composite Resources? 2:00 Composite Resources consists of 2:25 Composite request body 5:30 Composite request response 6:33…
Cross Component Communication with Custom Events | Salesforce Developer Quick Takes
In this Quick Take, we will learn how to take Custom Events and apply them to a common use case. We’re first going to take…