is there and equivalent of "g_form.getElement('sysparm_item_guid').value" in the portal ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-26-2021 01:36 AM
Looking to revise one of my old Client Scripts which depends on checking a record while the user is in a catalog item
In the old CMS I would use g_form.getElement('sysparm_item_guid').value which obviously fails in the Portal, but wondered if there is an equivalent I can use
I can see the Catalog Item is already assigned a new sys_id in the instance, but I cannot find how to access this Id from the portal.
Any ideas ?
TIA
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-27-2021 06:26 AM
Hi,
I could not find the da8c70e62fe930903c345fd62799b6cc in the HTML
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-27-2021 06:28 AM
this link has some workaround using widgets
it is worth trying
Is there a way to get the cart item id in portal
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-27-2021 09:07 AM
That works - though need to modify an ACL to change that.
I remember some code from another site that once added sp_form to a portal and was done via creating widgets. I may visit that and see if I can merge the two in some way so that a widget can be used and added to the portal instead of editing the OOB one and the issues that may cause
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-27-2021 10:31 PM
Do share the approach once done so that it helps future members.
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-28-2021 07:49 AM
Not sure I can do much more than that link and add the option in that widget
The code inside does the generateGUID, but it is not broadcast so I cannot get it elsewhere