UIB: UI Action to initiate Modal Dialog created in UI Builder
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-28-2021 01:41 AM
I have configured a modal dialog component in my page.
and plan to create an UI Action to open the modal dialog in the Workspace Client Script.
Is there a way to do it?
Few things I've explored:
1. tried g_modal.confirm but it is not able to change the label of the button which is fixed to be 'OK'
2. As i want to make use of the action bar component, the only way to utilise is to create UI action instead of adding a button in UIB and use event to initiate Open or close modal
Hopefully if anyone can help on this. TQ.
- Labels:
-
Agent Workspace
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-17-2022 06:44 AM
I found myself struggling at the same point but got it working now.
One mistake I made that I also see in you configuration on first glance is that the Key (action_key) in your Action Payload Definition record needs to be "OPEN_MODAL" - the name of the event you want to trigger. (You can see this in the 3rd screenshot of Daniel.Draes answer).
If it still doesn't work for you feel free to answer and I'll have a deeper look.
Edit: If your modal still doesn't render although you configured everything correctly: flush the instance cache (cache.do)! This solved all my issues.