Troubleshooting gs.info Output in LoanerUtils3 Script Include

Erica2
Tera Contributor

Hello,

 

I added the following gs.info lines to check what values were captured in the className and depot variables for troubleshooting purposes:

 

 
gs.info('LoanerUtils3 className=' + className); gs.info('LoanerUtils3 depot=' + depot);
 
 
ciRefQual: function() {

    var className = current.getValue('item_type');
    var depot = current.getValue('depot');
    var start = current.getValue('work_start');
    var end = current.getValue('work_end');

    // DEBUG LINE
    gs.info('LoanerUtils3 className=' + className);
    gs.info('LoanerUtils3 depot=' + depot);

    if (!className || !depot || !start || !end)
        return 'sys_idISEMPTY';

    var ids = this.availableCis(className, depot, start, end);

    if (!ids)
        return 'sys_idISEMPTY';

    return 'sys_idIN' + ids;
},
 

 

However, when I navigated to System Logs → All, I could not see these messages. Did I implement it incorrectly? Thank you

 

Erica2_0-1767326627992.png

 

1 ACCEPTED SOLUTION

Ankur Bawiskar
Tera Patron
Tera Patron

@Erica2 

gs.info() lines are correct.

are you sure that function is getting called properly? from where and when it's getting called?

if yes then logs should come

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

View solution in original post

1 REPLY 1

Ankur Bawiskar
Tera Patron
Tera Patron

@Erica2 

gs.info() lines are correct.

are you sure that function is getting called properly? from where and when it's getting called?

if yes then logs should come

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader