-
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 Administration Services: Why Every Business Needs Them in Today's Competitive Landscape
In today's fast-paced and highly competitive business landscape, companies are constantly seeking ways to streamline their operations, improve customer engagement, and drive revenue growth. Salesforce,…
4 Ways to Achieve Heroku-Salesforce Integration
Heroku provides a cloud application platform to create, run, and work with your cloud-based application. Heroku supports several programming languages like JAVA, Python, and PHP.…
Guide To Component Event And Application Event in Salesforce
Component Event Component event is fired by the when we instantiate the component. The component is fired from the child component and handled by the…
Popular Salesforce Videos
Salesforce — How To Market Your Small Business
How can small businesses get the word out about what they do, and be strategic about it? Here are three important steps to consider when…
How to Prepare for Salesforce Platform App Builder (CRT-402) ?
The Salesforce Platform App Builder certification focuses on the different declarative functions available to an admin. Development and code are not included, but it focuses…
Installation & Configuration Process of Salesforce 9Calendar
This video demonstrates the installation, configuration, and working of our latest Salesforce app 9Calendar. Watch this video till the end to understand its functionalities. Adding…