-
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
Why Should you Hire a Salesforce Pardot Consultant: Key Reasons to Know
Are you finding Salesforce Pardot Implementation a daunting task? Don’t worry. We are here with our complete guide on Salesforce Pardot Consultants and why should you hire them. What…
How Epicor ERP Software and AI Drive Smarter Manufacturing
Modern manufacturing businesses need more than basic systems to manage production, inventory, finance, and customer operations. They need connected technology that can turn business data…
Understanding Metadata API in Salesforce | The Developer Guide
Metadata API Salesforce Metadata API is utilized to help designers in retrieving, creating, deploying, updating, or deleting the customized information. It can be something that…
Popular Salesforce Videos
CPQ B2B Commerce Cloud Connector | Salesforce Tutorial
In these difficult economic times, businesses are looking for ways to improve efficiency and reduce the cost of doing business. More than ever, efficiency and…
Get Started with Salesforce Elevate
Salesforce is a powerful tool to analyze your past fundraising, and monitor your ongoing efforts. In this webinar, we'll start with the fundamentals -- understanding…
Embedding Salesforce Einstein Predictions in Tableau with Tomasz Bacewicz
Get the most out of Salesforce Einstein Discovery and Tableau by embedding Predictions directly in your Dashboards! Learn how from a pro. Watch this video…