When using custom JavaScript in Planning applications:
Specify which data forms the code applies to, as shown in SampleValidateData.js.
Maintain custom JavaScripts when upgrading Planning. When upgrading or modifying standard Planning JavaScript files, you must merge your code with the updated version of ValidateData.js. (If there are no changes to ValidateData.js, you can back up the file before upgrading Planning and copy your version of the file.)
The default Planning calc scripts can run after data forms are saved, so default calc scripts could overwrite the actions of custom JavaScript. If custom calc scripts run automatically after data forms are saved, calc scripts could overwrite actions of custom JavaScripts. If custom JavaScript determines how values are propagated throughout the hierarchy, be aware of possible conflicts with calc scripts.
Custom JavaScript can modify cells that are not visible on data forms. For example, if a quarter is collapsed, custom JavaScript can still affect values for individual months.
Depending on the complexity of code, cell-level JavaScript functions can have an adverse effect on application performance. For complex JavaScript, consider using the data form-level function (validateForm) or custom buttons to launch JavaScript code.
If custom JavaScript overrides default Planning behavior, you are responsible for ensuring that data is valid. You can verify data after running custom JavaScript using enterData.js. For examples, see LeaveCell.