I am new to Apex programming and am trying to play around with different uses for triggers. Currently, I am trying to create a trigger that when a custom text field on our Opportunity object is changed from NULL to any other value it will update a checkbox PO_Received from FALSE to TRUE on a custom object RFQ__c.

Could anyone help with providing some example pseudocode or similar that will assist in completing this task?

I suggest you to first try your hands on Trailhead. We have one trailhead module available for trigger.

Get Started with Apex Triggers

Once you complete this trailhead your current requirement will be very easy for you. In case if you still face any issue then share what did you try so far so community can assist you in better way.

Apart from that Trailhead, You can explore following regarding trigger:-

  1. Triggers
  2. Trigger Syntax
  3. Trigger Context Variables
  4. Defining Triggers
  5. Triggers and Order of Execution
  6. Trigger and Bulk Request Best Practices

These will provide more insight on triggers and their best practices and consideration.

And, Please provide the relationship between your Opportunity and RFQ__c so that I can provide you a sample code.

Your Answer

 
discard

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.