-
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
How to Reduce Your Salesforce Licensing Cost Smartly
Salesforce is the world’s no. 1 CRM with over 150,000 companies across various industries as its customers. Right from small businesses to FORTUNE 500 companies,…
Introduction to Salesforce Communities: Licenses and Benefits
What are Salesforce Communities? Salesforce is a San Francisco based organization that gives client connection to the board (CRM) programming arrangements. Most importantly, Salesforce people…
Popular Salesforce Videos
Salesforce Spring ’20 Release - Our Top 10 Features
The Salesforce Spring ’20 release is just around the corner - so it’s time to get ready for some great new features. Here's our top…
Salesforce and Disney Studios Join Forces
Salesforce and Disney Studios Content recently announced a five-year innovation partnership to help support Disney filmmakers and marketers using the Salesforce platform. By naming Salesforce…
How you can Increase your Salesforce Efficiency and Productivity
In this video, Brad discusses how to increase your workplace efficiency and productivity using various Google Chrome extensions and techniques. As always, we have linked…