-
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 Experience Cloud Support Portal: Key Considerations Before Implementation
In the realm of Salesforce Experience Cloud and its support portals, understanding the potential and possibilities is paramount. The Salesforce Experience Cloud is a robust…
Improving Customer Experience With an Integrated System
The Challenges The client was using two separate systems – Salesforce for customer support services and JIRA Software Cloud to track and release development operations.…
Popular Salesforce Videos
Salesforce Contact Tracing for Employees Demo
As businesses gradually reopen after worldwide closures, many people feel concerned about the second spike in COVID-19 cases. To ensure public safety, local officials have…
Salesforce Staff Has Option to Keep Working From Home
Dan Bognar, head of the strategy for Asia at Salesforce.com Inc., discusses how the coronavirus outbreak is affecting the San Francisco-based software maker’s operations and…
Salesforce Tutorial - What Is Data Loader
Generally, in the Declarative approach, developer enters data with page-layout, Data Loader is an amazing tool for bulk data processing. I have seen many migration…