-
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
Salesforce Connectivity Instructions for SpringCM
The Salesforce tool known as DocuSign CLM Files connects your Salesforce and DocuSign CLM businesses. Depending on the security access defined by administrators, authorized users…
What is the Future Scope of Salesforce CRM?
Nowadays the adoption of Salesforce CRM is increasing at a tremendous pace. As per reports, Salesforce dominated the worldwide CRM market with a market share…
Popular Salesforce Videos
Automate Simple Business Processes with Process Builder | Salesforce Trailhead
In this video, we working on the Trailhead challenge Lightning Flow unit Automate Simple Business Processes with Process Builder where a lot of trailblazers face…
Discount Categories in Salesforce CPQ
Use the discount category object to store values that you want to apply via rules to one or more products. After you associate the discount…
Salesforce Trailhead Bootcamp - Fast Track your Salesforce Certification - $700 OFF LIMITED TIME
If want to fast track the path to your Salesforce Administrator Certification then this video is for you! This offer includes your $200 Certification Voucher…