Hi,

 

Is it possible to set a title for a column in a DataGrid dynamically via client code?

 

I tried the following steps:

  1. Add an attribute to viewModelConfigDiff called "InspectorsSundayCaption".

 

            viewModelConfigDiff: /**SCHEMA_VIEW_MODEL_CONFIG_DIFF*/[
            {
                "operation": "merge",
                "path": [
                    "attributes"
                ],
                "values": {
                   "InspectorsSundayCaption":{
                   },

            ......}

 

  2. Bind the attribute to the caption property of column

                       {
                            "id": "aaa335c2-8291-0f65-e930-e39ca7e333a7",
                            "code": "DataGrid_244wb6vDS_UsrwpPoliceCarsSunday",
                            "path": "UsrwpPoliceCarsSunday",
                            "caption":"$InspectorsSundayCaption2",
                            "dataValueType": 4
                        },

 

  3. Set the attribute in the HandleViewModelInitRequest handler with the specific value.

 

    {
                request: "crt.HandleViewModelInitRequest",
                  handler: async (request, next) => {

                           .....

                           request.$context.InspectorsSundayCaption = "Sunday inspectors " + sundayDateStr;

                           await next?.handle(request);

}

 

This way work to me in normal column caption, But it doesn't work in a DataGrid column

 

Is there any limitation/step I'm missing?

 

Thanks in advance for your assistance!
Rachel
 

 

Like 0

Like

2 comments

Hi,
Does anyone have an idea?

Hello Rachel Markovski,

I have contacted our R&D team in order to help find a solution for your problem. The answer is unfortunate - currently there is no mechanism to dynamically change column caption in the datagrid component. 

Hope this helps.

Show all comments

Hello,

I need to create a custom handler for a button. It is necessary that after the button is clicked, two actions are performed sequentially: first, the record should be saved, and then a process should be triggered. My code isn't working. Could you please help?

 

        handlers: /**SCHEMA_HANDLERS*/[
 {        
     request: "crt.CustomHandler",
     handler: async (request, next) => {
   const result = await next?.handle(request);
   const handlerChain = sdk.HandlerChainService.instance;
   // Спочатку зберігаємо дані
   await handlerChain.process({
       type: 'crt.SaveRecordRequest',
       $context: request.$context,
       dataSourceName: "PDS"
   });
   // Потім викликаємо процес
   await handlerChain.process({
       type: 'crt.RunBusinessProcessRequest',
       $context: request.$context,
       processName: "srProcess_5c65949",
       processRunType: "ForTheSelectedPage",
       showNotification: true,
       recordIdProcessParameterName: "ID"
   });
   return result;
}
}
]/**SCHEMA_HANDLERS*/,
Like 0

Like

2 comments
Best reply

Ігор Роїк,

Hello,

Have you tried importing a "creatio-devkit/common dependecies" as well as passing sdk as a parameter to your schema function? 1

 message: Uncaught Error: Uncaught (in promise): ReferenceError: sdk is not defined
ReferenceError: sdk is not defined

Ігор Роїк,

Hello,

Have you tried importing a "creatio-devkit/common dependecies" as well as passing sdk as a parameter to your schema function? 1

Show all comments

Hey guys,

 

How can I close the navigation sidebar programmatically?

 

I'm trying to implement the same behavior that happens when you press the button indicated in the image below, making the main navigation bar to hide, so I can give users more width space for the section form screen without them to having to do that.

 

 

I tried with something like this based on what I saw somewhere in the code, but is not working for me.
 

const closeSidebarRequest = { 
	type: "crt.NavigationPanelChangeVisibleRequest", 
	$context: request.$context, 
	isVisible: false 
	};
 
await request.$context.executeRequest(closeSidebarRequest);

 

 

Thanks!

 

 

 

Like 0

Like

3 comments

Hello Andres,
Thank you for your question.

I am a bit confused as I do not understand the business need for this customization. Could you please clarify if this is a necessity? From my point of view, this feature is a bit of an overkill. First of all, there is already a button to control whether or not the navbar is shown. If the user wants to have control over seeing the navbar, and you implement an additional way to do so (for example, another button), then you will have two buttons for the same task. Secondly, I think that calling crt.NavigationPanelChangeVisibleRequest will not help.


I will be glad to assist you if you need to implement this functionality. I am curious about how you plan to control the visibility of the navbar.

Hi Yevhenii, 


In our case users are mostly working on one section and do not move from there. I'd like to hide the navbar by default when they enter to creatio and as you said, in case they need to navigate outside of that section they can open it with the button thats already there.

 

Is there any way to hide the navbar by default for all users? That is what I'm trying to accomplish, not another button.

 

Thanks,

Andres

Hello Andres,

I have come up with a solution that might help. When the user navigates to the application, the left panel is hidden/collapsed by default. If the user wants the left panel to be visible, they can click on the top-left button to show the navigation panel. To do this, I replaced the MainShell schema with the following code:
 

define("MainShell", /**SCHEMA_DEPS*/["@creatio-devkit/common"]/**SCHEMA_DEPS*/, function/**SCHEMA_ARGS*/(sdk)/**SCHEMA_ARGS*/ {
   return {
       viewConfigDiff: /**SCHEMA_VIEW_CONFIG_DIFF*/[
       ]/**SCHEMA_VIEW_CONFIG_DIFF*/,
       viewModelConfig: /**SCHEMA_VIEW_MODEL_CONFIG*/{
           attributes: {
           }}/**SCHEMA_VIEW_MODEL_CONFIG*/,
       modelConfig: /**SCHEMA_MODEL_CONFIG*/{}/**SCHEMA_MODEL_CONFIG*/,
       handlers: /**SCHEMA_HANDLERS*/[
           {
               request: 'crt.HandleViewModelInitRequest',
               handler: async (request, next) => {
                   const viewModel = request.$context;
                   viewModel["WorkplaceNavigationPanelVisibleAttribute"] = false;
                   return next?.handle(request);
               }
           },
           ]/**SCHEMA_HANDLERS*/,
       converters: /**SCHEMA_CONVERTERS*/{}/**SCHEMA_CONVERTERS*/,
       validators: /**SCHEMA_VALIDATORS*/{}/**SCHEMA_VALIDATORS*/,
   };
});

 

Hope this will help you.

Show all comments

Hey guys,

 

How can I close the navigation sidebar programmatically?

 

I'm trying to implement the same behavior that happens when you press the button indicated in the image below, making the main navigation bar to hide, so I can give users more width space for the section form screen without them to having to do that.

 

 

I tried with something like this based on what I saw somewhere in the code, but is not working for me.
 

const closeSidebarRequest = { 
	type: "crt.NavigationPanelChangeVisibleRequest", 
	$context: request.$context, 
	isVisible: false 
	};
 
await request.$context.executeRequest(closeSidebarRequest);

 

 

Thanks!

 

 

 

Like 0

Like

0 comments
Show all comments

Hello Creatio Community,

 

I am currently working on a Python application that extracts data from the Creatio API using the OData protocol. The application has been successfully tested in our quality environment, where it functions flawlessly. However, as I prepare to deploy the application in our production environment, I need some clarification on how to handle SSO (Single Sign-On) authentication for API access.

Here are the key details and questions:

 

User Account for Authentication:

In our production environment, which uses SSO, should I use a Creatio user account that is specifically added to the SSO group, or can I continue using a regular Creatio production user account, as I did successfully in the quality environment without SSO?

 

API Authentication Configuration:

For SSO-based authentication in the production environment, is there any additional configuration required in the API call setup compared to what is recommended in the Creatio documentation for environments without SSO?

Here is the reference to the documentation I’m following:  https://documenter.getpostman.com/view/10204500/SztHX5Qb#46f97170-d66d-4ed9-8941-08590bcdf444.

 

Environment Links for Reference:

 

If there are any best practices or specific considerations when transitioning from a non-SSO environment to an SSO-enabled production environment, I would greatly appreciate any insights. This includes potential pitfalls, user account configurations, and any modifications required in the API requests when dealing with SSO.

 

Thank you in advance for your support and guidance!

Like 1

Like

2 comments

Hello,
 

All external requests to Creatio must be authenticated. There are two ways to do this:
 

1) Forms authentication (cookie-based) implemented using the AuthService.svc web service. For this authentication, you need to use a regular user in the Creatio system that has not been created using SSO. You can test this on the Supervisor user who is initially logged in.
2) OAuth 2.0 is one of the supported authorization types in Creatio. Identity Service implements OAuth 2.0 in Creatio. It authorizes third-party apps and web services you integrate with Creatio using OAuth 2.0.
 

You can find the corresponding authorization examples (AuthService.svc and OAuth 2.0) in the official Postman collection of OData protocol requests for Creatio.


So, to summarize - you don't need to be tied to SSO users and you can use a regular user or OAuth 2.0 authorization.
 

Have a nice day!

Serhii Parfentiev,

Thank you for the clarification!

 

I wanted to provide some additional context regarding my situation. I am using user account authentication, and there are two different URLs for authentication in our production environment:

 

SSO Authentication: https://LINKPROD.ma/Login/Login.html?use_sso=true

This link is used when users need to authenticate via SSO.

 

VPN Authentication: This link is used for users connecting through a VPN and involves a different authentication process.

 

In my case, I need to connect using the SSO link. I’m currently trying to authenticate with this link: https://LINKPROD.ma/ServiceModel/AuthService.svc/Login, using the username and password of a regular Creatio user (not an SSO user). However, this approach doesn’t seem to be working.

 

Is there any specific configuration or additional steps I need to take to ensure successful authentication through the SSO link using a regular Creatio user account?

 

Thank you again for your support!

Show all comments

Hi all,
Does anybody know how to store data in a rich text field without the HTML tag? There's an example in the knowledge base section; it has 2 columns ("Notes" with the "Rich text" data type to display and save article data with the html tag and "NotHtmlNote" with the "unlimited length data" data type that stores the article value without the html tag), but I don't know how it works.
 

Thank you.

Like 0

Like

2 comments
Best reply

The way that the OOTB KB area does it is it binds an attribute to the crt.RichTextEditor control's "plainText" property. This returns the text version of the contents. If you view KnowledgeBase_EditPage you'll see the plainText property there

The attribute there is added to the model in the viewModelConfigDiff, which is how it's bound to automatically save to that path.

Also, a side note, there's a process added from the CoPilot stuff which exists in recent versions that can be used as a subprocess for stripping out HTML tags from text, called "Trim html in text". You can use a process and pass in the InputText parameter and you'll get back the text without the HTML tags in the OutputText param. This would be easy to use as a process to save the unformatted text as well.

Ryan

The way that the OOTB KB area does it is it binds an attribute to the crt.RichTextEditor control's "plainText" property. This returns the text version of the contents. If you view KnowledgeBase_EditPage you'll see the plainText property there

The attribute there is added to the model in the viewModelConfigDiff, which is how it's bound to automatically save to that path.

Also, a side note, there's a process added from the CoPilot stuff which exists in recent versions that can be used as a subprocess for stripping out HTML tags from text, called "Trim html in text". You can use a process and pass in the InputText parameter and you'll get back the text without the HTML tags in the OutputText param. This would be easy to use as a process to save the unformatted text as well.

Ryan

Ryan Farley,

Thank you. It's very clear and helpful.

Show all comments

Hi,

 

Is it possible to add click event on Loadmorebutton "Show more" in Detail?

 

 

Thanks

Like 0

Like

3 comments
Best reply

Hello,

 

Please note that currently there is no possibility to set this up using the basic user tools, but we have registered this idea for our R&D team and they will review the possibility of implementation of such functionality in future releases.

Hello,

 

Please note that currently there is no possibility to set this up using the basic user tools, but we have registered this idea for our R&D team and they will review the possibility of implementation of such functionality in future releases.

Mira Dmitruk,

Thanks Mira

What exactly do you want to do when the button is clicked?

Show all comments

Hi team!

 

The progressbar is currently changing how many stages show, based on the screen size. 

 

If you check the images below, wider screens are showing all stages and at certain point is reducing to current and next stage. 

 

 

 

Is it possible to tweak at which width length is doing this change? or remove this behavior at all forcing the breadcrum to show all items?

 

Thanks!

Like 0

Like

2 comments

Hello,
 

Thank you for your question.


Currently, this behavior is not adjustable, but we will keep you informed of any updates on this feature. We've registered your request with our R&D team to explore the possibility of customizing the progress bar’s stage visibility based on screen width in future releases.


Best regards,
Ivan

Hi,


Is it possible to set Tooltip with each Stage? I got some relevant code inside 'stageItems' but not working:

{
                "operation": "insert",
                "name": "EntityStageProgressBar_5oliugk",
                "values": {
                    "type": "crt.EntityStageProgressBar",
                    "saveOnChange": false,
                    "askUserToChangeSchema": true,
                    "entityName": "Lead",
                   "stageItems": [
                       {
                           "stageId": "Converted",
                           "caption": "Converted",
                           "tooltip": "This is the Last stage of the lead."
                       },
                       {
                           "stageId": "Marketing qualified lead",
                           "caption": "Marketing qualified lead",
                           "tooltip": "This is the initial stage of the lead."
                       }
                   ]
                },
                "parentName": "ProgressBarContainer",
                "propertyName": "items",
                "index": 1
            },

Show all comments

I want to send a weekly report to specific group of people with dynamic content like lead converted in last week, opportunity closed in last week etc. 

How can I configure email template with such data from creatio sections?

Like 0

Like

1 comments

Hello,

 

You could use a business process where the system calculates this value (formula element), use the 'send email' element with the template, and add this information using business process parameters.

 

Best regards,
Yuliya

Show all comments