-
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
6 Ways to Improve Salesforce Release Management
Salesforce was initially planned as a CRM. Be that as it may, it's become a mainstream improvement stage because of its natural usefulness. Salesforce uses…
Working and Usage of lightning:recordEditForm | Salesforce Developer Guide
Build a form with the lightning:recordEditForm component to add a Salesforce record or change fields in an existing record. The part shows fields along with…
HubSpot vs Salesforce CRM: Find the Best Fit for Your Business
Selecting the ideal CRM today can reshape how you market, sell, and nurture customer relationships. With CRM technologies rapidly evolving, AI-driven workflows, predictive analytics, and…
Popular Salesforce Videos
Work.com Workplace Command Center Demo
Work.com provides you with essential solutions designed to help businesses reopen the workplace as quickly as possible while helping to keep employees, customers, partners, and…
The Power Of Displaying Salesforce Data in Google Maps
Ever wondered where on earth your Leads are? Or your customers and prospects for that matter? Well here’s the way to find out. Display your…
Salesforce Admin Beginners Tutorial - 3.1 - Salesforce Platform Basics
Salesforce is an innovative tool that can be very powerful when used properly. That’s why it’s important to find effective and trustworthy ways to learn…