if (scriptContext.fieldId == ‘custbody_jj_wave_delivery_fee’) { let deliveryWaiver = currentRecord.getValue({ fieldId: ‘custbody_jj_wave_delivery_fee’ }); if (deliveryWaiver) { let options = “Are you sure you want to waive delivery fee? Please enter the reason.”; currentRecord.getField({ fieldId: ‘custbody_jj_deli_fee_reason’ }).isMandatory = true if (window.confirm(options)) { return true; } else { currentRecord.getField({ fieldId: ‘custbody_jj_deli_fee_reason’ }).isMandatory = false currentRecord.setValue({ fieldId: ‘custbody_jj_wave_delivery_fee’, value:… Continue reading How to create alert in with Ok and cancel button in client script