Set Invoice status to paid
I have an invoice database and I am looking for a way to monitor the balance of an invoice and once the Balance due = 0 then set the Invoice status from “Billed” to “Paid”. The balance field is a calculation field that is the Invoice total – payments made.
I can think of a few different ways to change this field but once it is set to a paid status it would not be likely to change again. Therefore I am trying to figure out the most efficient way to set this field, is it a script trigger (onObjectModify)? Does that script trigger if the value changes via a calculation or only when a user makes a change?
Any suggestions on this are appreciated!