g_user.getClientData defined in catalog client script is not working in Service portal

Viswanatha Red3
Mega Expert

My requirement is

  1. End user identifies the Configuration item.
  2. Navigated Service catalog from my CI form.
  3. From the catalog choose the item, to place the request. (All catalog items has CI as variable)
  4. pre-populate the CI from which he has navigated.

I have set the session variables using putClientData at server-side (during step2). And trying to accesss them in the onLoad catalog client script using the script g_user.getClientData(..). 

This is perfectly working in Native UI and CMS portal.

However, the same onLoad catalog script is not working in Service portal. I am receiving the undefined.

Would any let me know the alternate approach.

Regards

Viswa

 

5 REPLIES 5

I can think of 2 options here

1) Access the session data in your request widget using angular server side controller. This is possible but I am not aware of it.

2) Add a UI action form link on the CI and direct user to the catalog item using it instead of navigating to the catalog page.

Thanks!