In my custom Application, I am unable to select the Categories from the "Global" application?

wengkin
Mega Contributor

I created a service catalog item using the Application Studio in the application "Testing". When I tried to select a category, I was not able to find any available categories. However when i switch to the "Global" application, the categories appeared.

Is there a restriction that does not allow me to select categories that are created from different applications?

The error i received "The 'Catalog Item Category' record is in application 'Global', but its 'Catalog Item' parent record is in application 'APAC Testing'. The record and its parent must be in the same application."

Edit: I do find it strange that only Catalog Item Category has this restriction, but we don't face this issue with Catalogs, and/or other fields.

17 REPLIES 17

Hi akhilbhat,



Is this what you were asking? It was default to "Tracking".




wengkin
Mega Contributor

Anyone can advise if I had done anything wrong?


peterh_smith
Tera Contributor

This makes no sense.  Suppose I created a scoped app for Share or Store that includes one or more catalog items.  Someone installs the app.  They want to add the catalog item where they want, which happens to be a global category.  They cannot.

Why impose this restriction in the first place?

peterh_smith
Tera Contributor

I took a crowbar and wedged it in.  I wonder what the side effects will be.

 

var catItemId = '5bc5b0c1db656300d4b15eea4b961991';
var categoryId = '95fc11615f1211001c9b2572f2b477c6';
var gr = new GlideRecord('sc_cat_item');
gr.get(catItemId);
gs.info(gr.name);
gr.setWorkflow(false);
gr.setValue('category', categoryId);
gr.update();
gs.info(gr.getValue('category'));

Peter,

 

     I came across your article and know it is old but figured i would chime in with what i figured out.  I think there is a bug in the system!  I am working on building a scoped application and want a catalog containing the items in the scoped application.  I had to create a catalog in the global scope and then create categories within the global scope as well.  I then tried to add items from the scoped application and got the same error mentioned in this article.  The way around it that worked for me was to go to the catalog item itself and then make sure it is pointing to the global catalog and category that i setup.  Once I did this it worked and the scoped cat item showed on the global catalog/category.  Weird, but it worked.  Figured I would share.

 

Russell