Custom Component CLI deployment failing to create properties in UI Builder (Cross-scope )
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 hours ago
Hi everyone,
I am currently developing a custom UI component using the ServiceNow CLI (snc ui-component deploy) on my PDI. Everything compiles and deploys correctly (the terminal returns "Finished deploying!"), and the component itself renders perfectly in UI Builder.
The Issue:
The properties I defined in my now-ui.json (like title, subtitle, icon) do not show up in the UI Builder "Configure" panel on the right side.
My Investigation:
I checked the system logs right after deploying and found that the CLI is being blocked from writing the metadata. I get the following error:
Security restricted: Create operation against 'sys_ux_lib_component_prop' from scope 'x_1964881_mon_te_0' has been refused due to the table's cross-scope access policy.
I tried to manually add the properties via the sys_ux_lib_component_prop.list table, but the rows are hidden/blocked by security constraints (it seems to require the internal maint role).
My Workaround:
I managed to bypass this by running a Background Script explicitly set to the Global scope to manually insert the records into sys_ux_lib_component_prop. After clearing the browser's IndexedDB cache and replacing the component on the page, the properties finally appeared in UIB.
My Questions:
Is this strict Cross-Scope restriction on the sys_ux_lib_component_prop table a known limitation specific to PDIs?
Is there a proper way to grant my scoped application the correct cross-scope privileges so that the CLI can automatically write these properties during the deploy command?
Any insights would be greatly appreciated! Thanks.
