The CreatorCon Call for Content is officially open! Get started here.

Warning Evaluator - Parent is not defined

reginabautista
Kilo Sage

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?

find_real_file.png

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:

find_real_file.png

7 REPLIES 7

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


reginabautista
Kilo Sage

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 !


Perfect !