Use getElementById in catalog client script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-10-2016 08:12 AM
Hello,
I want to retreive the widget data (which is an HTML table in my case) on a client catalog script to store a dynamic table data into a producer result, nearly the same problem was discussed in this post: Widget and Record Producer .
In order to do that, I want to use: document.getElementById("tableId"); in a catalog client script and do other javascript process, the problem is that I think it's not possible to manipulate the DOM in catalog client script (I'm in Helsinki). is there any solution to this problem (use the DOM or other alternative) in the post shown below they are speaking about: $scope.page.field.value = VALUE but I don't how can I use it?
Thanks in advance
- 10,026 Views
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-24-2016 08:12 AM
I didn't find a solution to this problem (I think that we can't do it in Helsinki), but in response to your problem, you can use: g_form.getUniqueValue() to retrieve the sys_id
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-25-2016 01:24 AM
No Hicham,It didn't worked for me
Thanks
Saranya

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-11-2018 08:30 AM
Yes, same here. I've created a Catalog Item for the new Service Portal and attached an SP Widget Macro:
The widget simply looks like this:
I then attached a Catalog Client Script to the Catalog Item:
Well, when that Catalog Client Script triggers, I get this in my console log:
So... this tells me that Catalog Client Scripts on the Service Portal don't have access to the DOM.
Okay, so I thought adding this System Property would work:
as told here: Re: Fuji client scripts: document object is null
Nope, didn't work! How very frustrating.
Anyone have a solution ??
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-13-2018 10:36 PM
Hi david,
I am also facing same frustration now. Anyone have solution? or may i know, how you resolved it?
Regards,
RG.