How to prevent users updating Notes in Salesforce?
To prevent users from updating Notes in Salesforce, develop a trigger on Note object and throw an error when someone tries to update the notes. Sample Trigger:trigger NoteTrigger on Note ( ....
To prevent users from updating Notes in Salesforce, develop a trigger on Note object and throw an error when someone tries to update the notes. Sample Trigger:trigger NoteTrigger on Note ( ....
Sample Trigger:trigger CaseTrigger on Case ( before update ) { Set < Id > setCaseIds = new Set < Id >(); Map < Id, Integer > mapOpenCaseCount = new ....
To disable "Price Book" book selection while creating an Opportunity, the Pricebook2Id field should be populated. If the Pricebook2Id field is blank, it will prompt to select the Price Book. ....
Custom Field in Account to update when Contact is created: Sample Trigger: trigger ContactTrigger on Contact ( after insert ) { Set < Id > setAccountIds = new Set < ....
Requirement:Mark First Response Milestone as completed when the agent changes the status of the Case from New to Working. Note: IsCompleted field in CaseMilestone is not Writeable/Editable.So, this cannot be updated. But, ....
Sample Code: trigger LeadTrigger on Lead ( after update ) { Set < Id > setContactIds = new Set < Id >(); for ( Lead objLead : trigger.new ) { ....
In the below example Notification will be sent to the Account owner when the file is attached to their Account records. Notification Type in Setup: Sample Code:trigger ContentDocumentLinkTrigger on ContentDocumentLink ( ....
For example, if two contacts are merged, only the delete and update contact triggers fire. No triggers for records related to the contacts, such as accounts or opportunities, fire.1. The ....
Below trigger fetches the Accounts of the converted Leads. It sets the Record Type Id to External Account Record Type Id if the Account's Record Type Id is not External Account ....
In certain scenarios, we need to make the callout from the trigger to call an external webservice however we are not able to do so as it gives the below ....