Help with Client Script on a specific transaction type
I am new to scripts… have a working pageinit script coping one field from vendor bill to vendor payment when initiated from the vendor or individual bill and the user select make payment. Would like to get this script to also work when making multiple payments using the menu “Transactions>>Payables>>Pay Bills
Client scripts are for records you create/modify in your browser. The bulk processing context is not processed in your browser so client scripts wont work. Consider instead a user event script, or the better performing map/reduce or scheduled scripts.
As battk mentioned you can’t use Client Scripts to account for when making multiple payments using the menu “Transactions>>Payables>>Pay Bills” page. You’d have to do some testing but my thoughts for a workaround are:
- You could create a scheduled script that runs every __ that checks Bill Payments and updates a field based on the associated Bill.
- You could create a script to trigger upon record save (like afterSubmit or beforeSubmit which both run on the server side). So the logic could be: when saving a Bill Payment check to see if __ field has a value, if not go get and set it. This would only work if the navigation through the UI triggers a “save” like it would if a use actually saved a record…