Issues when trying to navigate to incident categories via UI Action in SOW

diegodossan
Tera Contributor

We are facing a problem when trying to redirect to the portal via the UI Action - Create Workplace Incident. This portal displays all incident categories, allowing the user to browse and select the desired category.

When we point to the incident catalog, the message "You are either not authorized or the record is not valid" is displayed. However, when we point to a specific item, it allows access, and through that item, we can also access the incident catalog.

Initially, we suspected that the incident catalog was not within the service workspace portal, but we added it, and the error persists.

The request catalog works normally.

The script we are using within the UI Action is as follows:

function onClick(g_form) {

var result = g_form.submit('sysverb_ws_save');

if (!result) {

return;

}

result.then(function () {
var params = {};
params.sysparm_parent_table = "interaction";
params.sysparm_parent_sys_id = g_form.getUniqueValue();

var propertyDetails = new GlideAjax('global.WIPPropertyUtils');
propertyDetails.addParam('sysparm_name', 'getPropertyValue');
propertyDetails.addParam('sysparm_property_name', 'sn_sc_workspace.sys_id_workplace');
propertyDetails.getXMLAnswer(function (response) {
var propertyValue = response;
g_service_catalog.openCatalogItem('sc_cat_item', propertyValue, params);

});
});

}

3 REPLIES 3

Ankur Bawiskar
Tera Patron

@diegodossan 

screenshot you shared is taking user to particular catalog item

But your code is not taking user to particular catalog item

So I am confused

Remember the user should satisfy User Criteria mentioned in "Available For" related list in that catalog item

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

diegodossan
Tera Contributor

@Ankur Bawiskar 

 

In the test screenshot, we directed the user to a specific item. However, the desired outcome is a return to the Incident Catalog level. However, when attempting to do this, the message displayed is "Issues when trying to navigate to incident categories via UI Action in SOW".

@diegodossan 

I already informed above

the user should satisfy User Criteria mentioned in "Available For" related list in that catalog item

Did you check that?

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader