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.

Script source code logged to browser console, Failing widget error

Rajesh44
Tera Expert

Hi Guys,

I am facing the below error on service portal when I try to open any RITM ticket (not for all users). Please refer the below image.

find_real_file.png

 

Thanks

1 ACCEPTED SOLUTION

Hi Timmo

Found the solution, created the read acl on the table sc_req_item.

 

View solution in original post

8 REPLIES 8

 Do you have any custom fields on that table? - Yes

Is the 'Ticket Fields' widget the out of box code, or has it been cloned and modified? - No it is OOB we didn't clowned that.

Hi Timmo

Found the solution, created the read acl on the table sc_req_item.

 

Community Alums
Not applicable

Awesome.

If anything I said pointed you in the right direction, please mar some of my responses as 'Helpful'.

Cheers,

Tim

Hari63
Tera Contributor

Hello,

when i try close the associate sc_task at time of closure of RITM, facing the same error,

i also created write ACL on sc_task table. but couldn't resolve the issue.

Kindly help to resolve.

My After BR:
Table: sc_req_item

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

  
var gr2 = new GlideRecord('sc_task');
gr2.addQuery('request_item', current.sys_id);

gr2.query();
while (gr2.next()) {
       gr2.setValue('state', 3);//closed complete
       gr2.update();
}