Trigger – Example 11
Use Case:Example 10. Write an Apex trigger named "OpportunityValidationTrigger" that fires before update and enforces the below conditions. If any of the…
Use Case:Example 10. Write an Apex trigger named "OpportunityValidationTrigger" that fires before update and enforces the below conditions. If any of the…
Use Case: Example 10. Write an Apex trigger named "OpportunityTrigger" that automatically updates a custom field named "TotalOpportunityAmount" on the Account…
Use Case:NOTE: An extended version of Example 8. (Example 8: Whenever a new User having profile "System Administrator" is inserted and is…
Use Case:Write a trigger:Whenever a new User having profile "System Administrator" is inserted and is Active, add the user to the…
Use Case:Write a trigger:Whenever the BillingCity of any Account is updated, update MailingCity of all the Contacts related to the account.Note:…
Use Case:Write a trigger:Count the total number of contacts associated to an Account whenever a Contact is, Inserted, Updated or Deleted related…
Use Case:Write a trigger, to achieve the following:If an opportunity is closed then, no one should be able to delete it…
Use Case:Write a trigger, to achieve the following: Given: There is any associated Contact to an Account, When: User tries to delete the…
Use Case:Write a trigger, to achieve the following:Create a new Opportunity whenever an account is created/updated for Industry - Agriculture.Opportunity should be set…
Use Case:Write a trigger, if the owner of an account is changed then the owner for the related contacts should also…