-
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
APEX Rest Callout in Salesforce Integration
The Salesforce REST API allows you to integrate with Salesforce applications by using standard HTTP methods such as GET, POST, PUT, PATCH, DELETE, and HEAD.…
Best Practices for Salesforce Data Migration
Conducting data migration from or into Salesforce can be time-consuming but a necessary task. Data migration is a challenge for any enterprise. You might face…
How to Use Salesforce Chatter Better?
Here are 3 main STEPS, by which you can use SALESFORCE chatter more efficiently. Take a look… STEP 1: Follow relevant people and data Keep…
Popular Salesforce Videos
See how fast and easy you can make intuitive Salesforce solutions to your users with Cauzali.
Instead of coding or very complex flows use Cauzali. Place your Cauzali model everywhere in Salesforce including in the middle of a Flow. Price between…
3 Tips on How To Deliver a Successful Product Launch | Salesforce on Salesforce
Salesforce defines a product launch as announcing a new offering to the public. Launches are an opportunity to tell a compelling story about your product,…
How to Start a Process with Parameters on UiPath Robots from Salesforce Interface
How to start a process with parameters on UiPath Robots from the Salesforce interface. Watch this video and learn. Let us know in the comments…