Tuesday, February 5, 2019

nlapiCommitLineItem and nlapiSelectLineItem sometimes not working on Field Change Function

When fieldChanged Function happens, it will source in values for other fields depending on the current field value change, which means, it will make a call back to the server to get these values, and it's done asynchronously. When the value from the server have not come back yet, code will prevent committing of current line and go to the next line, because you're not done with the current line yet. The reason why it works sometimes is because the server sometimes responds back fast enough where it then lets you commit line and go on to the next time.

Per design, FieldChange event is for validating the field, or change other field as a result. It was not intended for developers to commit the line and go to a next line. 

No comments:

Post a Comment