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

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

Brad Warman
Giga Sage

Thanks @Harish KM , that did the trick!

 

For anyone else who comes across this, here is what I configured on the sys_restricted_caller_access table:

BradWarman_0-1705465220534.png

 

Hayden Reid
Tera Guru

Hi Brad,

Did you need to create a scripted extension point for the department to department transfer of tickets? Would you be willing to share an example of one, if so? I can't seem to get the primary ticket to be created after attempting to transfer at the department level despite the configuration being setup properly (services, mappings, transfer config, etc.).

Hi Hayden.

 

Here's an example of what I am using for an implementation under the CreateDepartmentTicket scripted extension point (CreateDepartmentTicket is kept out of the box). You'll need to create a new implementation for each class type that you want to make available. In this example, we have a custom table that holds finance ticket records. Use the efGR.setValue method to set the field values on your table. 

 

var CreateFinanceTicket = Class.create();
CreateFinanceTicket.prototype = {
    initialize: function() {
    },

	/*
     * Performs the department ticket creation
     *
     * @Param {GlideRecord} urGr - the record of universal request
     * @Param {string} serviceSetId - The sys_id of the the corresponding universal_request_service_set record
     * @Param {string} serviceId - The sys_id of the the corresponding universal_request_service_conf record
     *
     * @returns newRecord {sys_id} for the newly created record. 
     */

    createTicket: function(urGr, serviceSetId, serviceId) {
        var efGr = new GlideRecord("TABLE NAME");
        efGr.initialize();
        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]));
        }
        efGr.setValue('assignment_group', '9c4b1b1c1bdab85029b0213a2d4bcbf9'); // Assignment group sys_id
		efGr.setValue('email', urGr.opened_for.email);
		efGr.setValue('opened_by', urGr.opened_by);
		efGr.setValue('contact_type', 'transfer_ur');
		efGr.insert();
        return efGr.getUniqueValue();
    },

    /*
     * Returns the sys_id of configuration record used for department name configurations
     *	
     * @returns {string} The sys_id of the the corresponding universal_request_service_set or  universal_request_service_conf record
     */

    getImplementerID: function() {
        var implids = ['955365021bf4bd5086a098e7b04bcbfb', '140ded4e1bf4bd5086a098e7b04bcb2f']; // Service Set sys_id and Service record sys_id of the relevant department you are transferring to
        return implids;
    },

    type: 'CreateFinanceTicket'
};