Agent Workspace- Create Request Button

Sreedhar3
Tera Contributor

Hi Team,

I am trying to redirect the page to a specific catalog( custom catalog)when we click on create request button on the Agent workspace. As we have oob button script it is redirecting to the service catalog. If we change the code to a specific sys ID then it is throwing an error stating that access error.
 
You are either not authorized or record is not valid.
 
The above is the error I am getting
 
function redirect() {
var result = g_form.submit('sysverb_ws_save');
if (!result) {
//failed form submission
return;
}

result.then(function() {
var params ={};
params.sysparm_parent_table = "incident";
params.sysparm_parent_sys_id = g_form.getUniqueValue();
g_service_catalog.openCatalogItem('sc_cat_item', 'dad2f45de8803100ee5118d02d1a930a' ,'-1', params);
});
}// 
 
In the above code I am just trying to open a specific Catalog item but same problem like
You are either not authorized or record is not valid. 
 
Thanks in Advance
3 REPLIES 3

Maik Skoddow
Tera Patron
Tera Patron

Hi @Sreedhar ,

if you want to use your custom service catalog you have to register it first. Otherwise, you will get an error because Agent Workspace cannot find your Catalog Item in the predefined Service Catalog.

Please see page https://docs.servicenow.com/bundle/paris-servicenow-platform/page/administer/workspace/task/assign-s... to learn how to register your Service Catalog for Agent Workspace.

Kind regards
Maik

If my answer replied your question please mark appropriate response as correct so that the question will appear as resolved for other users who may have a similar question in the future.

Hi @Sreedhar ,

Did my reply answer your question?

If so, please mark the appropriate response as "correct" so that the question will appear as resolved for other users who may have a similar question in the future.

If not, please tell me what you are still missing.

Many thanks & kind regards
Maik

I'm looking through the link but I'm unable to find the Agent workspace that I'm working on.