Is there a way to get the cart item id in portal

venkatiyer1
Giga Guru

Hi all,

in the normal view of a service catalog item, if you were to try executing g_form.getParameter("sysparm_item_guid")   you would get the cart item id in advance before the item gets submitted.

Is there a way where i can get the cart item id of the item getting submitted in service portal?

1 ACCEPTED SOLUTION

Ahh, yes now I understand.



Unfortunately it is not possible in serviceportal. The serviceportal uses the cart API and therefore does not pre-generate any IDs as it just passes the catalog item details along when you add an item to the cart.



Maybe you can describe your business logic for this, and I might be able to give you some alternative suggestions?


View solution in original post

10 REPLIES 10

g_form.generatedItemGUID not working even after widget customization, it is giving undefined. I'm currently in Utah

var cat_id = g_form.generatedItemGUID;
    alert(cat_id);