Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Reference qualifier is not working

ankitbanerj
Tera Expert
var getValidContractsForAccount = Class.create();
getValidContractsForAccount.prototype = Object.extendsObject(global.AbstractAjaxProcessor, {
    getValidContractsForAccount: function(accountId) {
		gs.info('ankit1::'+accountId);
        if (!accountId) return 'sys_id=NULL';

  },
    type: 'getValidContractsForAccount'
});

This is my script include which I am calling in order management form while user will enter their account.
I am calling this script include in reference qualifier for a custom field.
Screenshot 2025-05-17 at 5.43.34 PM.png

Issue: It is not printing any logs.


1 ACCEPTED SOLUTION

Animesh Das2
Mega Sage
Mega Sage

Hi @ankitbanerj ,

 

It looks like the SI function is not getting executed due to wrong syntax while calling it, please correct the syntax as below and test if it works.

javascript: new sn_app_orm_wksp.getValidContractsForAccount().getValidContractsForAccount(current.account)

 

If this address your question, please don't forget to mark this response correct by clicking on Accept as Solution and/or Kudos.

You may mark this helpful as well if it helps you.

Thanks, 

Animesh Das

 

 

View solution in original post

2 REPLIES 2

Bert_c1
Kilo Patron

Try setting the sys_properties record 'glide.security.sandbox_no_logging ' to false.

Animesh Das2
Mega Sage
Mega Sage

Hi @ankitbanerj ,

 

It looks like the SI function is not getting executed due to wrong syntax while calling it, please correct the syntax as below and test if it works.

javascript: new sn_app_orm_wksp.getValidContractsForAccount().getValidContractsForAccount(current.account)

 

If this address your question, please don't forget to mark this response correct by clicking on Accept as Solution and/or Kudos.

You may mark this helpful as well if it helps you.

Thanks, 

Animesh Das