Monday, 16 September 2013

Reason for nlapiSetFieldValue not working in BeforeLoad event of User Event script

If you are trying to use nlapiSetFieldValue in BeforeLoad event of a User Event Script , and wondering why it is not setting some fields value, then you might find the reason below

nlapiSetFieldValue API , if used in BeforeLoad event of a User Event Script , sets values only if the record is either new (being created ) or non-stored fields. (Non-stored fields are those that have the 'Store Value' preference unchecked on the custom field page.)

Another way to do this , is to use a 'Client Script' and PageInit event.That works.

No comments:

Post a Comment