Can Notifications be used from a Modal?

Can Global Interface Methods be called from within a Modal?

Tried to do the following before closing the modal instance:

client.interface.trigger("showNotify", {
      type: "success", message: "The ticket was updated. Please refresh to see changes."

Get this message back:
Requested Service is not available InterfaceAPI

Hi, @bjh81782, welcome to the community!

As the documentation states, it is not possible to use interface methods within modal.

Show Modal Documentation:

The method opens a Modal dialog box in an IFrame to display HTML content to users. Events methods and Interface methods are not supported within the Modal IFrame.


Thanks for the reply. Somehow missed that.

1 Like

To trigger a notification, you can use the Toast, from Freshworks Crayons library.


To confirm, that only appears within the modal iFrame itself though, correct?

I’ll just pass some success data back to the parent and trigger the interface notification from there.

I’m not sure what you mean here… but the bottom line is you can’t use interface and events methods within iFrames.

You can totally do that!
Or within iFrame, you can use the Crayons as I pointed out!

The question I had on crayons: I believe the toast notification just appears within the Iframe itself and not at the top of the page. That was my experience at least. Perhaps I did something wrong.

1 Like

Ah, yes! The toast appears only within the iFrame.