Hi, 

I have grouped a number of cases (Stages in my case) in the workflow. The decision of which stage will be chosen, is decided in a business process inside the previous stage.   

The problem is that the first stage of the group always shows, even if it will never be processed during the workflow. How can I hide this stage on a specific condition and show the other stage in the group.

Current workflow:

the grouped stages

 

Like 1

Like

1 comments

Hello, 

To hide a specific stage from the workflow based on a condition, you can use the "Automatic transition to next case stage" field in the stage properties. Set the value to "If required steps are completed" and configure the required steps in the previous stage's business process. If the condition is not met, the case will automatically transition to the next stage in the group, effectively hiding the first stage.

To learn more about how to set up case stages there is instruction from Academy: 
https://academy.creatio.com/docs/8.x/no-code-customization/8.1/bpm-tool…

Show all comments

I have a list page, and its data source is a spesefic object we have created.  above the list table there is a search element. What i want is when there is no filter applied the list table should be empty and, when any filter is applied then it should show only the matching resluts. How can i achieve this? What now happening is it is showing all of the existing records, but when i wanted to set up a business rule I could not find any option to access search element.

Like 0

Like

3 comments

And also, when the filter is cleaerd the list should again be empty as there is no filter applied

Zulaykho,

Clear the list isn't an easy task and needs a development team to be involved. Instead, you can prevent the list load by showing the Error message to the customer:

{
	request: "crt.SearchFilterColumnsGroupsRequest",
	handler: async (request, next) => {
		const searchValueLenIsZero = request?.value?.length == 0;
		const isEmptySearchValue = request?.value?.trim().length == 0;
		if (searchValueLenIsZero || isEmptySearchValue) {
			Terrasoft.showErrorMessage("There is no filter");
               } else {
                 await next?.handle(request);
               }
	}
}

Best regards,

Anhelina!

Anhelina,

Thank you a lot for your response! 

Show all comments

Hello,



I'm trying to learn the new Studio 8.0.6 front end development way of doing things as it is very different from the 7 versions.  I started by creating a list and I want an action menu that calls a process that will update some fields on the record and then opens it. 

 

I found this article Set up a custom action menu for list and list records | Creatio Academy that explains how to add custom actions from a list, but I cannot find a reference that shows how to do the same but instead of opening the page, to run a process and the opening a page. Is there a reference to all the existing handlers? 



I found some of them on the SysUerProfilePage but not one to run a process.

 

Thanks, 

Jose

Like 0

Like

2 comments

Hello,



You can find the answer in this community post:

https://community.creatio.com/questions/call-business-process-action-it…

Cherednichenko Nikita,

Thanks for the link but the information there works for the 7.x versions but not for the Freedom UI pages on the 8.0.6 version.

 

I figured it out how to accomplish that on a Freedom UI page by looking at the code generated by Studio when adding a button in the page that calls a process, this article Set up a custom action menu for list and list records | Creatio Academy and by the information on this link Receiving Server-Side Messages in Client-Side Code on a Creatio Freedom UI Page | Customer FX



The code looks something like this:

viewConfigDiff: /**SCHEMA_VIEW_CONFIG_DIFF*/[

    ...

    {

        "operation": "merge",

        "name": "DataTable",

        "values": {

            ...

            "fitContent": true,

            "rowToolbarItems": [

                {

                    "type": "crt.MenuItem",

                    "caption": "#ResourceString(LockAndOpenButton_caption)#",

                    "icon": "lock-button-icon",

                    "clicked": {

                        "request": "usr.LockAndOpenRecordRequest",

                        "params": {

                            "recordId": "$Items.PDS_Id",

                            "someOtherParameter": false

                        }

                    }

                }

            ]

        }                

    },

    ...

]/**SCHEMA_VIEW_CONFIG_DIFF*/,

viewModelConfig: /**SCHEMA_VIEW_MODEL_CONFIG*/

{

...

}**SCHEMA_VIEW_MODEL_CONFIG*/,

modelConfig: /**SCHEMA_MODEL_CONFIG*/

{

}/**SCHEMA_MODEL_CONFIG*/,

handlers: /**SCHEMA_HANDLERS*/[

    {

        request: "usr.LockAndOpenRecordRequest",

        /* Implementation of the custom query handler. */

        handler: async (request, next) => {

            /* Get an instance of the singleton service that opens pages. */

            const handlerChain = sdk.HandlerChainService.instance;

            /* Send a crt.RunBusinessProcessRequest system query that runs a process. */

            result = await handlerChain.process({

                type: 'crt.RunBusinessProcessRequest',

                processName: "UsrProcessToRunName",

                processRunType: "RegardlessOfThePage",

                processParameters: {

                    "RecordId": request.recordId,

                    "SomeOtherParameter": request.someOtherParameter

                },

                resultParameterNames: ["ErrorMessage"],

                $context: request.$context

            });

            if (!result.success)  {

                //display error

                Terrasoft.showErrorMessage(request.$context.get("Resources.Strings.UnableTo_caption"));

            }                            

            /* Call the next handler if it exists and return its result. */

            return next?.handle(request);

        }

    },

    {

        request: "crt.HandleViewModelInitRequest",

        handler: async (request, next) => {            

            /* handle message from process */

            request.$context.ServerMessageReceivedFunc = async function(event, message) {

                if (message && message.Header && message.Header.Sender === "ProcessFailed") {                            

                    Terrasoft.showErrorMessage(Ext.decode(message.Body).MessageText);

                }        

                if (message && message.Header && message.Header.Sender === "OpenRecord") {        

                    var recordId = Ext.decode(message.Body).MessageText;                            

                    const handlerChain = request.$context.handlerChain;

                    await handlerChain.process({

                        type: 'crt.UpdateRecordRequest',

                        itemsAttributeName: "Items",

                        recordId: recordId,

                        $context: request.$context

                    });

                }

                else if (message && message.Header && message.Header.Sender === "RefreshPage") {

                    const handlerChain = request.$context.handlerChain;                            

                    await handlerChain.process({

                        type: "crt.LoadDataRequest",

                        $context: request.$context,

                        config: {

                            loadType: "reload"

                        },

                        dataSourceName: "PDS"

                    });

                }

            };

            Terrasoft.ServerChannel.on(Terrasoft.EventName.ON_MESSAGE, (await request.$context.ServerMessageReceivedFunc), request.$context);

            return next?.handle(request);

        }

    },

    {

        request: "crt.HandleViewModelDestroyRequest",

        handler: async (request, next) => {

            Terrasoft.ServerChannel.un(Terrasoft.EventName.ON_MESSAGE, (await request.$context.ServerMessageReceivedFunc), request.$context);

            return next?.handle(request);

        }

    }

] /**SCHEMA_HANDLERS*/,

converters: /**SCHEMA_CONVERTERS*/{}/**SCHEMA_CONVERTERS*/,

validators: /**SCHEMA_VALIDATORS*/{}/**SCHEMA_VALIDATORS*/

Show all comments