-
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
Choose An Experienced Company For Salesforce Development In The USA
When you wish to achieve unparalleled customer service, it is essential to choose an experienced and professional Salesforce Development company. The reason to select an…
Use Salesforce Communities like Never Before | Salesforce Community Cloud
In today's business landscape, maintaining strong customer relationships is crucial yet challenging. Traditional methods often struggle to keep customers updated while maintaining confidentiality. Salesforce Community…
Where is Salesforce DevOps Heading? Is it the Future, and if so How?
Salesforce DevOps is distinct. It enables efficiency and collaboration among shareholders that some other platforms just cannot provide. It’s not as if DevOps is extremely different from…
Popular Salesforce Videos
Level Up Your Processes With Google API and Salesforce Integration
Complex processes often span multiple systems. In this session, we'll cover how to integrate Google APIs into your Salesforce org with an API library in…
Salesforce Platform Quick Tip: How to Make Key Information Easier to Find
Want to flag things on a Salesforce record, so that your users notice? Like flagging a super important customer record, or alerting them that a…
Security in Salesforce - What Developers Must Know
Security in Salesforce 0:00 Introduction 3:00 Agenda 4:05 Data security 5:18 User Mode & System Mode 9:13 CRUD & FLS Data Model 10:45 Enforcing CRUD…