Get sys_id of included item of an order guide - service portal

michal_v
Giga Contributor

Hey,

Does anyone know how can I tell, when I'm inside an order guide in service portal, what is the item sys_id (not the order guide sys_id)?

1 ACCEPTED SOLUTION

g_form.getUniqueValue()   will provide you with catalog item sys_id.



catItem = $("sysparm_id").value;             ----->         catItem = g_form.getUniqueValue() ;


View solution in original post

8 REPLIES 8

g_form.getUniqueValue()   will provide you with catalog item sys_id.



catItem = $("sysparm_id").value;             ----->         catItem = g_form.getUniqueValue() ;


Yes, but if i'm viewing this item inside an order guide it will return the order guide sys_id and not the current item.


Are you sure about that ? I think they are taking g_form instances differently. Also in client controller they are having a separate instance of g_form for each included item and they are storing it in an array. It should return the sys_id of current item only.


I tested again and it seem to work. Thank you!