-
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 Show Pardot Activities in Salesforce?
Introduction on Showing the Pardot Activities in Salesforce Do you think it is necessary to keep Pardot Email Activities in Salesforce? This post will provide…
Salesforce Developers Guide: Build Your App With Salesforce AppExchange
Are you looking to start building Salesforce apps? You probably have a comprehensive understanding of how Salesforce works and know that there are many things…
How Agentforce Sales Speeds Up the Lead-to-Cash Cycle with MuleSoft and Flow
Sales teams lose time at every handoff. A lead sits in one system. A quote lives in another. Approvals crawl through email. By the time…
Popular Salesforce Videos
Salesforce TrailheaDX '18 Opening Keynote - Part 4: Build Apps Fast
Salesforce TrailheaDX ’18 Opening Keynote – Part 1: Create Connected Customer Experiences TrailheaDX ’18 Opening Keynote – Part 2: Salesforce Platform TrailheaDX ’18 Opening Keynote…
What are Roll-up Summary Fields in Salesforce? | How to create them?
In this video, Shrey is not only teaching but also demonstrating to you "What are Roll-up Summary Fields in Salesforce?". You will be learning: 1.…
Salesforce Online Training Videos For Beginners | Campaign Management
Learn all about the Salesforce campaign management in this video. Watch and learn. If you have any doubts or questions, please let us know in…