Good day to everyone! I’ve encountered a task where I need to update the NextSteps component. I used crt.LoadData and crt.ChangeNextStepsStateRequest, but they didn't produce the desired results.

After executing, the component does not update, and data is not displayed; only after a full page refresh does the Next Step appear.

Has anyone encountered a similar issue and could help with a solution? Thanks in advance!
 

{
				request: "crt.HandleViewModelInitRequest",
				handler: async function(request, next) {
					this.applyMethods(request.$context);
					Terrasoft.ServerChannel.on(Terrasoft.EventName.ON_MESSAGE, (await request.$context.ServerMessageReceivedFunc), request.$context);
					await next.handle(request);					
				},
				applyMethods: function(context) {
					let methods = {
						refreshNextStepsStates: async function(date) {
							console.debug(date);
							const handlerChain = sdk.HandlerChainService.instance;
							await handlerChain.process({
								type: 'crt.ChangeNextStepsStateRequest',
								$context: context,
							});
						},						
 
						showWarnDialog: async function(message) {
							const actionsConfig = [
								{
									key: "OK",
									config: {
										color: "warn",
										caption: resources.localizableStrings.BnzShowDialogCloseBtn
									}
								}
							];
							const result = await context.executeRequest({
								type: "crt.ShowDialogRequest",
								$context: context,
								dialogConfig: {
									data: {
										message: message,
										actions: actionsConfig
									}
								}
							});
						},
 
						onSubscribeWebSocket: async function(event, message) {
							if (message.Header.Sender === "Banza_ApprovalAction_WebSocketSender") {
								await this.handleShowWarnMessage(message);
							}
						},
 
						handleShowWarnMessage: async function(message) {
							const sysValuesService = new sdk.SysValuesService();
							const sysValues = await sysValuesService.loadSysValues();
							const caseId = context.attributes.Id;
							const currentUserContactId = sysValues.userContact.value;
							const msgObj = JSON.parse(message.Body);
							if (msgObj && sysValues && currentUserContactId === msgObj.currentUserContactId) {
								if (caseId === msgObj?.recordId) {
									if (msgObj.action === "showWarnDialog") {
										await this.showWarnDialog(msgObj.message);
										await this.refreshNextStepsStates(msgObj?.date);
									}
								}
							}
						},
 
 
					context.ServerMessageReceivedFunc = methods.onSubscribeWebSocket.bind(context);
					Ext.apply(context, methods);
				},
}
Like 4

Like

1 comments

Hi,
Normally, the Next Step component should refresh automatically and show a new step, does it now work in your case? If so, how do you add a new task to it?

Show all comments

Hi all, 

we have Next steps elements in Freedom UI. But "+" creates Task by default. How can we add one more thing like create a case or send message? Is it possible in freedom UI?



Thanks in advance.

Like 0

Like

2 comments
Best reply

Hello, 

You can add items to the menu from the + (add) button to add things such as "Create a case" etc. However, the case won't show in the Next step list. 

To add items to the list, you can do this with no code in the page designer (click the + button and add a new item to it)

Ryan

Hello,

Unfortunately, it is not yet possible to add the option of adding Emails, Calls, and Messages records via clicking on Next Step. Alternatively, you can try to perform such an action through customization in the Freedom UI designer. Add menu items to the + Next Step button and customize the opening of pages for different types of activities.

However, we have forwarded your idea to the responsible R&D team to add this functionality in future releases.

 Thank you for helping us to improve our product!

Hello, 

You can add items to the menu from the + (add) button to add things such as "Create a case" etc. However, the case won't show in the Next step list. 

To add items to the list, you can do this with no code in the page designer (click the + button and add a new item to it)

Ryan

Show all comments

Is it possible to intercept using some request handler the event when a user clicks on the green "Complete" button on a Next Steps tile? This is the button in the "next-step-tile-actions" div on the page which only appears when you hover over the next step tile:

 

It would be vey helpful to be able to run some custom code when this button is clicked - in our case, we need it to save the main page record before actioning this next step, as completing the next step might automatically transition the Lead to the next stage, losing any data entered by the user.

Like 220

Like

6 comments

None of the following handlers are triggered by clicking this button, maybe I've missed some candidates but these are the ones I've tried so far:

crt.ChangeNextStepsStateRequest

crt.OpenPageRequest

crt.UpdateRecordRequest

crt.CreateRecordRequest

Also tried "brute forcing" it by overriding every handler I could find in the Creatio code, but literally nothing fires when clicking that button! Not even something like the page's crt.HandleViewModelPauseRequest (since it's a modal popup, I guess the full page doesn't actually pause like it would when navigating to a another page through clicking a lookup for example). Hopefully I've missed something, triggering some action on clicking that button would be useful.

Any thoughts/knowledge on how such a thing could be achieved?

Hi Harvey! 

 

Unfortunately, at the moment, there is no way to intercept the event of clicking on the Next-steps tile buttons. This button can call different requests depending on the type of tile, and these requests are called without the view model context, which will not allow us to intercept them from the card and use them to save card data.

 

We have registered your idea, and the R&D team has already planned the task for this improvement - they will create a special output event for the Next-steps component. This functionality will be available in future releases.

 

Thank you for making our product better!

 

Best regards,

Natalia

Thank you for the information Natalia, this would be a welcome improvement!

Hi Natalia, is there any expected timeline for this improvement known yet? Do you have a reference for the planned task for later follow-up?

Show all comments

Hi everyone,

 

Is there a way to display the "add next steps" button/functionality for each record in the list view, so that you can add a task to that record with the pre-filled values without opening that record? 

 

Thanks, Timea

Like 2

Like

2 comments
Best reply

Hello,



I have discussed this request with the Product Owner.

As for now, there is no such functionality.



We have already registered the idea for our R&D team to implement this functionality in further releases.



Thank you for this suggestion, this helps to make our product better!

Love the idea

Hello,



I have discussed this request with the Product Owner.

As for now, there is no such functionality.



We have already registered the idea for our R&D team to implement this functionality in further releases.



Thank you for this suggestion, this helps to make our product better!

Show all comments

Hi everyone,

 

is there any possibility to prefill some of the data when I would like to add a new "next step task" for the account or for the opportunity? I mean, I would like to add a new task, and I don't want to search for the exact opportunity name, if I do it from the opportunity page. 

 

Thanks, Timi

Like 0

Like

2 comments

Hello Timea,

 

You have to set the correct data source. For example, if I will create a new task from the case page and I want to fill in the case automatically:

 

I should set the data source "Activity.Case" for this field: 

Thank you so much for your answer :) 

Show all comments

Hello, 

we have Next steps elements in Freedom UI. But "+" creates Task by default. How can we add Email, Call, Message there?

 

 

Thank you!

Vladimir

Like 3

Like

1 comments

Hello,



Unfortunately, it is not yet possible to add the option of adding Emails, Calls, and Messages records via clicking on Next Step. Alternatively, you can try to perform such an action through customization in the Freedom UI designer. Add menu items to the + Next Step button and customize the opening of pages for different types of activities.



However, we have forwarded your idea to the responsible R&D team to add this functionality in future releases. Thank you for helping us to improve our product.

 

Show all comments

Is it possible within Freedom UI to trigger a refresh of the Timeline/Feed/Next Steps components using JS? We seem to have an issue where the "Enable live data update" option does not seem to be working in Creatio CRM 8.1 for our Activities on certain pages, and while we've raised a support request for this, we were trying to find a workaround by manually updating the components from code for a specific use case, but we can't see what the data source is called for these types of components. Does anybody know what it would be? I presume refreshing the PDS would refresh them, but this seems heavy handed and might end up with data being lost on the main form page while the data actually being refreshed is just a child entity, so I would expect it to have its own data source.

Like 4

Like

3 comments

+1

Hello Harvey and Damien!

In Freedom UI Pages, the structure of the page is different and along with this a new way to refresh anything on the page. In this article you can find the way to achieve your goal:

https://customerfx.com/article/refreshing-reloading-page-or-list-data-on-a-creatio-freedom-ui-page/

Here's example of handler which you can use:

handlers: /**SCHEMA_HANDLERS*/[
 {
  request: "crt.HandleViewModelAttributeChangeRequest"/* The custom implementation of the system query handler. */
  handler: async (request, next) => {
   await next?.handle(request); 
   if (request.attributeName === 'Your Attribute Name' )
   {
    const handlerChain = sdk.HandlerChainService.instance;
    await handlerChain.process({
     type: 'crt.LoadDataRequest', $context: request.$context,
     config: { loadType: 'reload' },
    dataSourceName: 'Data Source Of Obj You Want To Refresh'
    });   
   }
  }
 },

You may also find this article useful:

https://customerfx.com/article/receiving-server-side-messages-in-a-creatio-freedom-ui-page/

 

Anhelina,

 

How can we find what the data source is for a component like a Timeline or Next Steps component though? The article suggests looking at the modelConfig elements in the page code, but none of these seem to relate to the timeline or timeline tiles. I expect there is some data source being created behind the scenes but finding out what it's called is the main problem for applying the theory of being able to reload anything on the page as is suggested.

 

Many thanks,

Harvey

Show all comments