The Zurich release has arrived! Interested in new features and functionalities? Click here for more

RITM for one catalog item cannot be opened in SOW (gFormData.isvalidRecord)

michael78991
Giga Guru

We've been having an issue with viewing a RITM for a specific catalog item (Request for Stations Team) in the SOW. Any help is appreciated. Please let me know if there's any other information that would be helpful for fixing this.

 

INFORMATION ABOUT THE ISSUE

  • Catalog Item is for a Non-IT team
  • The team using this request is only using RITMs (Only one we have)
  • It can be viewed in the IT Service Portal and ESC
  • No matter who opens a “Request for Stations” RITM, it will display “Record Not Found”
  • In UI Builder, (Service Operations Workspace > Record SNC) there is a client script: "Hide Record Not Found"
    • I believe the condition that is triggering the issue is the "gFormData.isvalidRecord"
function handler({api, event, helpers, imports}) {
  const gFormData = api.data.gform.nowRecordFormBlob;
  // setting initial value to false
  api.setState('isValidRecord', false);

  if (gFormData) {
    const isValidRecord = gFormData.isValidRecord;
    const canReadRecord = gFormData.canReadRecord;

    api.setState('isValidRecord', isValidRecord && canReadRecord);

    const isNewRecord = gFormData.isNewRecord;
    api.setState('isNewRecord', isNewRecord);

    const hideRecordNotFound = isNewRecord || isValidRecord;
    api.setState('hideRecordNotFound', hideRecordNotFound);

    // Check for read access only when we don't show record not found message. 
    if (hideRecordNotFound) {
      const hideSecurityConstraints = isNewRecord || canReadRecord;
      api.setState('hideSecurityConstraints', hideSecurityConstraints);
    }
  }
}

THINGS I'VE TRIED LOOKING INTO

  • Changing record's item field manually (Only records created as a Request for Stations Team don't work)
  • Creating a Catalog Task in the flow
  • Filling in the CI field (because we have a UI Policy to hide it)

ESC.pngIT_Service_Portal.pngSOW_List.pngSOW_Record.png

 

1 ACCEPTED SOLUTION

michael78991
Giga Guru

Solution from SNow Ticket:

"The issue is occurring due to the 'null(null)' variable set that is attached to the Requested item. This is causing conflict with the empty variable set for 'Attachment Warning'.

The presence of two 'null' fields is returning the record as invalid.

When removing the null variable set from the catalog item, new records are displaying correctly in the Service Operations Workspace."

View solution in original post

3 REPLIES 3

GlideFather
Tera Patron

Olá @michael78991,

quick brainstorming what to look at:

  • check for the roles/ACL,
  • scope vs cross scope,
  • check if the tables are not mismatched between the SOW and the scripts

No further ideas at the moment

———
/* If my response wasn’t a total disaster ↙️ drop a Kudos or Accept as Solution ↘️ Cheers! */


Hi @GlideFather Thanks for the quick response. I have a few questions about your ideas.

  • check for the roles/ACL
    • I am trying to view from an admin account, but I still cannot see. All sc_req_item read ACLs have admin override. Could there still be an issue here? I can't think of a reason why an admin wouldn't be able to see it
  • scope vs cross scope
    • We do not have any existing sys_scope_privilege records for the SOW or for sc_req_item, but I can read any other RITMs that weren't created as a Request for Stations Team. If I can view other RITMs, would creating a sys_scope_privilege record even affect this?
    • I tried creating a record, but it wouldn't let me go from Global --> Service Operations Workspace Core
  • check if the tables are not mismatched between the SOW and the scripts
    • It's using the Record SNC page, so the scripts don't assume it's a sc_req_item, they just refer to the record opened. Is there somewhere else I could check this?

michael78991
Giga Guru

Solution from SNow Ticket:

"The issue is occurring due to the 'null(null)' variable set that is attached to the Requested item. This is causing conflict with the empty variable set for 'Attachment Warning'.

The presence of two 'null' fields is returning the record as invalid.

When removing the null variable set from the catalog item, new records are displaying correctly in the Service Operations Workspace."