Universal Request Cross Scope Access Issue

Brad Warman
Giga Sage

Hi everyone,

I'm in the process of configuring Universal Requests and the ability to transfer tickets between departments. I have this working on each department (all scoped apps) but am getting the following error when attempting to create new tickets with the one department that uses a globally scoped app:

 

BradWarman_0-1705463837689.png

 

I've confirmed that the table is configured with 'Can read', 'Can create' and 'Can update' permissions and is also accessible from all application scopes.

 

BradWarman_1-1705463875230.png

 

I've also tried manually adding read, write and execute api cross-scope privileges on the sys_scope_privilege table (although that shouldn't be required) but that has not helped.

 

I've identified the business rule which is triggering the issue - the one which is creating the linked Universal Request record when the ticket is submitted (if I deactivate this then the error doesn't appear, but the linked Universal Request isn't created). When activated, the business rule correctly creates the linked Universal Request, but then the cross-scope error appears when it attempts to write back to the Universal Request field on the custom table.

 

BradWarman_2-1705464119210.png

Any ideas on where else I can look to get this working? It seems strange that all of the scoped apps worked correctly straight away but the one globally scoped app is the one causing problems.

 

Cheers,

Brad

 

1 ACCEPTED SOLUTION

Harish KM
Kilo Patron
Kilo Patron

Hi @Brad Warman Have you checked "sys_restricted_caller_access" table and allowed access? Ensure state is set to allowed

HarishKM_0-1705464776770.png

 

Regards
Harish

View solution in original post

8 REPLIES 8

Thanks for sharing, Brad.

I was able to get my scripted extension point up and running. Do you call your extended class from a business rule in order to create the ticket after the user clicks the "Transfer" button on their primary ticket? If that's the case would you mind also sharing that? Really appreciate your help, sorry for my tardy response.

Additionally, is the getImplementerID function necessary to be completed in order to have the department to department transfer work? I understand you've placed the Service Set sys id in the list, but not sure what the Service record sys id of the relevant department refers to. Is this the assignment group sys id?

Hi Hayden. For our custom applications, we were creating the UR by running an on insert business rule. Unfortunately I don't have the code for that at the moment as we've just refreshed our sub-production instance and lost that config for now. This doco shows the process on how to do it though.

 

https://docs.servicenow.com/bundle/washingtondc-employee-service-management/page/product/universal-r...

 

Question on this line of your scripted extension point, is this where you set the value of universal_request in your newly created department's ticket? I assume you've created a custom property to store the list of fields needing to be copied? Would you mind explaining how you're using this block?

 

        var copyFields = gs.getProperty("finance.universal_request.copy_fields");
        var copyFieldsList = copyFields.trim().split(",");
        for (var i = 0; i < copyFieldsList.length; i++) {
            var fields = copyFieldsList[i].split("=");
            efGr.setValue(fields[0], urGr.getValue(fields[1]));
        }


 

Hi Hayden. That's correct, there is a system property which is getting the fields that need to be copied from the UR to the department ticket. Unfortunately we've just refreshed our sub-production instance so I can't get the actual details of the one listed above, but here's the doco on how the OOB system property works for incidents. 

 

https://docs.servicenow.com/bundle/washingtondc-it-service-management/page/product/incident-manageme...

 

We just used the same process with separate system properties for each department we are creating tickets for. The code block loops through all of the fields mapped in the system property, gets the values and copies them from the UR to the department ticket.