3 views

Symptoms


PA job is throwing an error from a script used in a scoped application.
Error during JavaScript evaluation com.snc.pa.dc.ScriptException: JavaScript evaluation returned: Undefined in script: var gDate = new GlideDateTime();

 

Cause


GlideDateTime API is only available in the global scope.

Resolution


Add GlideDateTime in the scoped app scope by creating a record sys_scope_privilege.
 
Create a new record with the following:
 
TargetName -- GlideDateTime 
Operations-- Execute API
Status -- allowed
source scope -- <your_application_scope>
Target scope -- Global
 
 
 

Additional Information


GlideDateTime API is used in scoped application as an alternative for gs.datediff().

Article Information

Last Updated:2018-07-12 15:21:26
Published:2018-07-12