What is the purpose of Work Order Status field? I want the Work Order status to be automatically completed, if all the Service Appointments of that Work Order are completed. How to configure this? Thanks.


You could update the Work Order status value using a trigger on the Service Appointment object -- When a Service Appointment is updated, get its Work Order, get all its sibling Service Appointment records, loop through all Service Appointment records, and, if necessary, update the Work Order status.

I wouldn't go that route though.

You can do the same thing with Visual Flow, without writing any code. There's a very good post here that goes into detail, but that should give you the basic idea:


Flow designer showing update logic

Give it a try, and if you get stuck, post what you have here so we can help you out.


Flow and triggers are both options. I wold argue that Process Builder is an option with much less effort involved.

  1. Create a PB on the SA to run when SA status is set to 'Completed'
  2. In the PB, set the action to be performed to update the related record status (in this case, the WO).
  3. Done and done!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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