-
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 Trends to Look Out for in 2021
Salesforce is one of the top Customer Relationship Management (CRM) platforms. It helps businesses to connect with customers and potential clients by using cloud technology.…
Different Types of Object Relationships in Salesforce
In Salesforce, we can associate one object with another object. We can create the relationship by creating a custom relationship field of an object. By…
Optimising Salesforce-Kakao for Cross-Border Sales Success
In the rapidly evolving realm of worldwide trade, companies are always searching for inventive approaches to surmount cross-border obstacles and propel revenue growth. This is…
Popular Salesforce Videos
Understanding Products & Pricebooks in Salesforce
In this video, Shrey gave detailed information about products and pricebooks You will also learn: 1. How to add and manage Products in Salesforce? 2.…
Knowledge Base in Salesforce Lightning
By end of this video, we will be able to 1. Understand what is knowledge base. 2. Why we need to use Knowledge base 3.…
How to Learn Salesforce in easy step by step and get certified
From Salesforce instructor, Become a Salesforce Expert. Learn Salesforce step by step and get certified easily.