-
How to prevent a Salesforce record from being deleted in account object when rating is set to hot?
trigger Tour on Account (before insert ) {
Account sam=Trigger.new[0];
if(sam.Rating=='Hot' )
{
sam.AddError('record cannot be deleted');
}
}Even though when I run this record is deleting.
can someone help me with this ?
Log In to reply.
Popular Salesforce Blogs
Brave Your Business Challenges With Salesforce
As any business grows, it faces a plethora of challenges along the way. To keep up with the cut-throat market competition, it is extremely important…
What is an Enhanced Domain in Salesforce in 2023?
Enhanced domains are coming to My Domain in a future version. All URLs within your company—including those for your Experience Cloud sites, Salesforce Sites, Visualforce…
Popular Salesforce Videos
Salesforce To RDS Integration Through Dell Boomi | Salesforce Tutorial
Salesforce to RDS integration through Dell Boomi. This tutorial will cover the following points - 1. Introduction Take a quick glimpse at integrating accounts from…
Salesforce DX simplified with AutoRABIT - Bay Area Salesforce Developer Group
A common need that teams developing on the Salesforce platform express is the desire for a single solution that will take their developers through the…
Salesforce Live Executive Experience: UK and Ireland 2021
At Salesforce Live Executive Experience we welcomed guests in-person and virtually to enjoy enlightening content, much missed networking and a performance from Jools Holland. The…