How to show open or close Model Dialog based on condition by using script in UI Builder.
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-19-2023 10:55 AM
I want to show Open or Close model Dialog box based condition by using script in UI Builder.
Can anyone please help me with this.
Thanks Upendar.
1 REPLY 1

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-09-2023 04:53 AM
Hi @upendar5,
Once you call the client script from your condition builder/ button and any other component you can call the model open or close using the helpers api.
function handler({api, event, imports, helpers}) {
helpers.modal.open("[component-id$='alert_modal']") // define your model id inplace of alert_modal
}
let me know if it was useful.
Thanks