UI policy not working
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-09-2025 09:36 AM
i am facing one issue. if i am submitting a request from service portal, a particular catalog ui policy is running. But if i am inserting a record in that table by importing xml, then that ui policy is not working.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-09-2025 09:44 AM
is there any solution to that?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-09-2025 10:07 AM
try converting the same logic of UI policy to a business rule(Before Insert or Before Update).
Help future readers out—mark the answer and close the thread if it helped you!
If this response resolved your issue, kindly mark it as Helpful or Accept Solution—it helps others find the answer faster.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-09-2025 10:12 AM
Why the UI Policy Works in Service Portal but Not on XML Import
-- Catalog UI Policies:
- Are designed to run only on the Service Catalog interface (like Service Portal or the native Service Catalog UI).
- They are client-side scripts, meaning they execute in the browser when a user interacts with the form.
-- XML Import:
- When you import records via XML, you're performing a server-side insert.
- Since there's no user interface involved, UI Policies do not run.
- This applies to both Catalog UI Policies and standard UI Policies.
How to Handle Logic During XML Import
If you need similar logic to run during XML import or any server-side insert, consider these alternatives:
1. Business Rule
- Create a Before Insert or After Insert Business Rule on the target table.
- This ensures your logic runs regardless of how the record is created (portal, XML, API, etc.).
2. Script Include or Flow Designer
- If the logic is complex or reused, encapsulate it in a Script Include or Flow.
- Trigger it via Business Rule or Flow Designer action.
✔️ If this solves your issue, please mark it as Correct.
✔️ If you found it helpful, please mark it as Helpful.
—
Shubham Jain