Warning Evaluator - Parent is not defined
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-12-2017 05:50 AM
Hi guys
I am trying to test the access of a user that is a member of an assignment group. The user is accessing the child record without any problem. However when he hover over to the parent number field to access the parent record, I am seeing the the below error in the log. Also the error 'Record not found ' displays. Has anyone came across this issue?
org.mozilla.javascript.EcmaError: "parent" is not defined.
Caused by error in <refname> at line 9
6: builder.setUIPolicy(jelly.jvar_ui_policy);
7:
8: // pre-evaluate fields not on the form
==> 9: builder.preEvaluate(parent, jelly.jvar_fields_on_form);
10:
11: // see if there are any UI policies for the variables
12: var models = jelly.jvar_models;
Note: ACL is set up correctly for the user. I can also see in the log that the ACL returns true:
//grant current user read access to table if he/she is part of the assignment group.
var hasAccessRT=false;
var gr = new GlideRecord('u_security_incident_remediation_task');
gr.addQuery('parent',current.sys_id);
gr.query();
while(gr.next()) {
var assignmentGrp = gr.assignment_group.getDisplayValue();
var grpMember = gs.getUser().isMemberOf(assignmentGrp);
gs.log('grpMember=' + grpMember);
if (grpMember) {
hasAccessRT = true;
}
}
if ((current.u_requester==gs.getUserID())|| (current.opened_by==gs.getUserID()) || (gs.getUser().isMemberOf(current.assignment_group))||(current.assigned_to==gs.getUserID()) || (gs.hasRole('csirt')) || hasAccessRT){
gs.log('answer=true');
answer = true;
}
LOG:
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-12-2017 07:40 AM
Hi Regina
so this one is a custom application right ?
Are you in domain separation or the fields are scoped with the applications ?
Did you check the name of the parent field on the DB ? is it named u_parent or parent ?
Cheers
R0b0
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-12-2017 07:53 AM
Hey Rob, yep it is a custom app..I found the cause of the issue. It's a query BR that's restricting the records from displaying when sensitive. All's good now! Thanks !
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-12-2017 07:56 AM
Perfect !