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 06:51 AM
Hi Regina
Probably i'm wrong but the message record not found usually happens when you have the current record referencing another that doesn't exist anymore.
So locally you should have in the xml for the record something like this
<parent display_value="SINC0001721" name="SINC0001721">yourSysIDHere</parent>
On the other hand the record with number SINC0001721 has been deleted.
Did you check if you can find that record ?
Cheers
R0b0
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-12-2017 07:01 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-12-2017 07:03 AM
Hi Regina
That's quite interesting. I would suggest to create a new parent record.
A clean one where all the fields are properly populated.
This one also it doesn't seem well formed ;-/
do you mind to include the xml of this one
Cheers
R0b0
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-12-2017 07:20 AM
Hi Rob, I may not be able to provide XML due to the sensitivity of data. I have narrowed it down to this field 'u_sensitive' though. It seems that the record was classified as sensitive. I tested using a non sensitive record and it's working perfectly! Now where to find that restriction... I can't find anything in ACL and Business rules that restricts the record from displaying when u_sensitive = true..