-
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
How To Resolve When Salesforce Error Apex Heap Size Too Large
Salesforce upholds an Apex Heap Size Limit of 6MB for synchronous execution and 12MB for Asynchronous execution. The "Pinnacle stack size excessively huge" mistake happens…
A Complete Guide On How To Implement Salesforce For Better Results
Salesforce implementation is of key importance for any company, big or small, and no matter what their specific needs and preferences are. Being one of…
Data Cleansing and Migration: The Foundation for a Successful Salesforce Implementation in 2024
The success of a Salesforce implementation depends largely on the quality of data that powers it. Right from extracting the correct data from multiple sources,…
Popular Salesforce Videos
How Cross Channel Marketing Can Drive More Engagement ? | Salesforce Marketing Cloud
Cross-channel marketing is a customer-focused digital marketing technique used by marketers globally to provide an integrated experience across all paid, owned, earned media, and digital…
How to Edit or Change Product Schedules in Salesforce
Use product schedules to determine the payment and delivery cycles for products that are paid or delivered over time. In Lightning Experience, customize schedules with…
What is a Salesforce Admin?
Salesforce administrators are the gatekeepers of their employer's sales and marketing data. They create each user account and determine the proper level of access based…