com.glide.script.RhinoEcmaError: Method "toString" called on incompatible object.

Dinesh Chinnadu
Tera Contributor

I am calling the script include from BR and getting the below error

com.glide.script.RhinoEcmaError: Method "toString" called on incompatible object.

 

Script:

(function executeRule(current, previous /*null when async*/ ) {

    // Add your code here
    //gs.info('DC DevOps Fire BR');
    DevOpsLogger.log('DC DevOps Fire BR');
    gs.addInfoMessage('DC DevOps Fire BR start');
    //var lt = new sn_devops.DevOpsPipelineExecutionDAO();
    var lt = new DevOpsPipelineExecutionDAO();
    gs.addInfoMessage('DC DevOps Fire BR lt '+lt);
    
    var taskExecutionSysId = 'ffb445511b77495477cf98a98b4bcb79'; //TE0001921 

    lt.updateLeadTime(taskExecutionSysId);
    gs.info('DC DevOps Fire BR end');
    gs.addInfoMessage('DC DevOps Fire BR end');

})(current, previous);

Please assist me to overcome this issue.

 

Thanks,

Dinesh C

7 REPLIES 7

Hi,

don't call from background script

try to add gs.info() at appropriate places and debug

Regards
Ankur

Not applicable
Hi Dinesh, yes you will have to check Script Include and as per error i am predicting somewhere a null value is getting converted into string. Hope this will help you.

Scott M_
Tera Contributor

I had this same error.  I ran my script include code in a background script. Then I received a cross-scope access policy.  The root cause was actually cross-scope access.