There are two reasons that the script 'nlapiGetContext().getSetting()' would return a null value. Either the parameter where it's trying to get the value really is blank or the preference of the parameter is 'User'.
The value of the parameter is highly dependent on it's preference.
-If the preference is Company, it would be based on the value under Setup > Company > General Preferences > Custom Preferences.
-If the preference is blank, it would be based on the value of the parameter under the script deployment that was ran.
-If the preference is User, it would be based on the value of the parameter under Home > Set Preferences > Custom Preferences.
The reason why the preference User would always return null value on a Scheduled script is because when a scheduled script runs, the User being considered is the 'System' and not the person who ran the Scheduled Script or any other Users.
No comments:
Post a Comment