Facing the field value delay issue on working with the Client script

Sometimes, after a field change, we can get the log value once again. Once the value is changed, it returns the old value. In that scenario, we can handle it by using the setTimeout method.”

While working on the client script we are facing the issue.

Syntax:

setTimeout(getAmountDue, 500); //(Function to run delayed, delay time in seconds)

                    function getAmountDue() {

                        let amountDue = paymentRec.getCurrentSublistValue({

                            sublistId: ‘recmachcustrecord_jj_hidden’,

                            fieldId: ‘custrecord_jj_invoice_amt_due’

                        });

                        return amountDue;

                    }

By using this we can handle this scenario.

Leave a comment

Your email address will not be published. Required fields are marked *