Service Catalog Builder
Options
- 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.
5 REPLIES 5
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
The “Field” property you see on the Client Script List macroponent is not hardcoded; it is being populated dynamically from the page context. Here’s what happens under the hood in Catalog Builder:
- When you open a catalog item in Catalog Builder
- The framework loads the catalog item’s record into the page state.
- This includes the sys_id and other key fields.
- Macroponent property binding
- The “Field” property you see in the configuration is exposed by the Client Script List macroponent (it expects the catalog item reference so it knows what to filter on).
- In the page definition (UI Builder → Page JSON), this “Field” property is mapped to a state property, usually something like:
{
"field": "@state.record.sys_id"
}
- This means whatever record sys_id the page is holding will be passed into that “field” property automatically.