Service Catalog Builder
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago - last edited 3 weeks ago
Does anyone have any idea how Client Script Page in Catalog Builder fetching the sys_id of catalog item? If you see this page filters the records based on the current catalog item which is being edited in Catalog builder.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi @Rafael Batistot ,
Thanks for your response, but I am talking about "Client Script List" page macroponent.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Thanks for specification
In Catalog Builder, the Client Script List page macroponent doesn’t fetch the sys_id by itself, it gets it from the page context.
When you open a catalog item in Catalog Builder, the framework passes the current record’s sys_id into the page as a URL parameter (e.g. ?sys_id=<item_sys_id>) and makes it available in the page state. The Client Script List macroponent is configured to read that context variable (sys_id) and apply it as a filter on the catalog client script table (sc_cat_item_client_script).
So the flow is:
- Catalog Builder opens the item → injects the item sys_id into the page.
- The Client Script List macroponent reads the sys_id from page properties (state.sys_id).
- It uses that value in the filter condition (something like cat_item=<sys_id>).
- The list then shows only the client scripts tied to that catalog item.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
In this scenario, they are getting data from "field" property and then setting state. So I want to know how they are populating this "field" property in page.