-
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 Implementation Best Practices for Seamless Data Migration
Implementing Salesforce is a major milestone for any business looking to improve customer relationship management, streamline operations, and gain better insights from data. However, the…
Salesforce AppExchange - A Brief Guide
Salesforce is the world's leader in CRM due to the variety of customer process that enables the platform with out of the box modules. Salesforce…
Pardot Audit: How and Why It is Essential to Conduct One Today | Salesforce
Pardot is a powerful B2B marketing tool that allows marketers to run and manage multiple campaigns with ease. It is capable of automating processes and driving…
Popular Salesforce Videos
Create Custom App in Salesforce | Salesforce Custom App | Salesforce Tutorial
Watch this amazing video to learn how to create a custom app in Salesforce. Salesforce is a cloud-based platform that has transformed how companies have…
How Do All Salesforce Products Come Together
The products of Salesforce run completely in the cloud. Therefore, the companies don’t need to fret about costly maintenance and setup charges. Additionally, cloud technology…
App to Track Your Trailblazer Journey | Are you a Trailblazer? | Mini Project | Salesforce Tutorials
In this video I will create an App to track our Trailblazer Journey. You will find out if you are a Trailblazer by watching this…