How to Refresh the Edit Page of a Section

Hello Creatio community!

 

My first post on the forum. I have a business process that populates a Ticket Number field in a custom Tickets Section. This business process sets the field value and sends a message to the section's client module which includes the below code to handle the message and refresh the section so we can see the updated ticket number.

 

			init: function() {
				this.callParent(arguments);
				this.subscriptionFunction();
			},
			subscriptionFunction: function() {
				Terrasoft.ServerChannel.on(Terrasoft.EventName.ON_MESSAGE, this.onMyProcessMessage, this);
			},
			onMyProcessMessage: function(scope, message) {
				if (!message || message.Header.Sender !== "RefreshTicketPage") {
					return;
				}
				var message2 = message.Body;
				if (!this.Ext.isEmpty(message2)) {
					this.reloadEntity();
				}
			},
			destroy: function() {
			    Terrasoft.ServerChannel.un(Terrasoft.EventName.ON_MESSAGE, this.onMyProcessMessage, this);
			    this.callParent(arguments);
			}	

 

The code works fine, but the problem is upon clicking Save it closes the section edit page and shows the list, which does correctly include the updated ticket number. I want it to refresh the field and STAY in the edit page so the user doesn't have to reopen the section from the list after saving. Does anyone know if this is possible? To refresh the section while staying in the edit view? I'm using cloud and Classic UI and have attached a screenshot of the view I would like to refresh and remain open on the screen.

File attachments
Like 0

Like

1 comments

You can override the save function to prevent the closing of the form. See https://customerfx.com/article/prevent-navigating-back-to-a-parent-page…

Ryan

Show all comments