Question

Is it possible to use snackbar notifications in client?

In the angular code editors and WorkspaceExplorer in Creatio 7.17 there are toast notifications from the Angular Material Snackbar library that shows when you save or publish a schema, compile the configuration, etc. (the little black toast notification that displays in the bottom-middle of the screen after the save is complete)

Is it possible to use snackbar notifications in the client as well? Is there some module that wraps that functionality that can be used from client schemas?

Like 1

Like

3 comments

Hi Ryan,

 

We used a standard snack-bar as in the example here: https://material.angular.io/components/snack-bar/examples and wrapped with the service.

Here is an example: 

 

Bogdan Spasibov,

Hi, could I use a code similar to this in a task script in a process?

For example, on a page, a user clicks on a button to do something, the button executes a process and I want to inform the client that it is processing what the process does.... 

Julio.Falcon_Nodos,

Yes, I do this often and it works great. You'd need to:

  1. Send a message from the process to the front end. See https://customerfx.com/article/how-to-refresh-a-page-from-a-process-in-…
  2. Have some code somewhere that listens for the message. See https://customerfx.com/article/receiving-server-side-messages-in-a-crea…
  3. Then display the toast message. See https://customerfx.com/article/displaying-toast-message-popups-from-cre…

 

I've typically done this by making a generic process I can use as a subprocess. It sends the message to the client. Then I make a generic script loaded from MainShell or MainHeaderSchema that listens for the message and displays the toast. It makes it simple and generic to use and works on any page.

 

Ryan

Show all comments