Sunday, September 9, 2018

nlapiDisableLineItemField is not Working on pageInit Function

Sample client script on pageInit on Estimate form

1. Set the 1st line item, then Click Add
2. Edit the 1st line and notice that the Quantity field is no longer disabled.

Expected Result: The quantity field should be disabled.
Deploy the script on lineInit as this event occurs when an existing line is selected.
Note: Even if Line Init has been documented in the help guide as the one firing when an existing line is selected, some customers would still think that PageInit is sufficient. There is no guarantee that our system code will not re-enable this field even if it is disabled at some point by the user's code so the lineInit is the function to use if the desired behaviour is to disable the field for certain conditions.

No comments:

Post a Comment