Use g_modal to render a html content in workspace

Gabriel Azevedo
Tera Contributor

How i can use the glideModal function renderWithContent to generate a html modal on workspace, i'm trying using g_modal but nothing is working

2 REPLIES 2

Vivek Singla1
Tera Contributor

Hi Gabriel,

 

May I know which workspace are you talking about. Is it Agent or SOW or Custom??

I have created a Modal with related list in it. It is working fine in Agent Workspace but not in SOW.  

 

When I click on the record in Agent Workspace, it is taking me to the right record in the Workspace view but when I try to do the same in SOW nothing happens.

MattSN
Mega Sage
Mega Sage
  • g_modal() only works in workspace and does not include a renderWithContent option at this time
  • GlideModal only works in core platform view and does include a renderWithContent

To accomplish rendering HTML in a workspace modal you could use g_modal.showFrame() and then render a UI page, Knowledge article or other HTML object type, although this may not offer the full capabilities.

Try this blog post for some examples
https://snpro.dev/2023/11/20/workspace-modals-working-with-ui-pages/