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. I've been working with Creatio for some time already. And I've been facing an issue. The issue is not picking up on changes that were added to the files already added to the package when uploading a new version of a package on any environment. I am talking about .cs files, in other words, the source code type of Creatio files. So, when I finish fixing some bugs with the package locally, I go to the dev env. to upload the package there. I do the uploading via `ApplicationHub` page via `install from file`. So, the issue happens only when the previous package version is installed and I want to update with the newer version. If I remove the previous version and upload a new one, all new changes are picked up.

Like 0

Like

1 comments

Hello!

 

In this case, it could be two possible options as to why it happens:

 

1. It can happen if the schema has a more fresh ModifiedOn date in configuration, for example, if it was recently modified directly on the environment; if so, the schema won't be updated.

2.  Sometimes, the schema updates only after full compilation. so the steps will be install package -> full compilation -> check the schema.

 

If the issue would still reproduce, contact us at support@creatio.com.

Show all comments

Hello all,

 

I've been facing this error as it's shown in the screenshot and Subject, it occurs when i try to save the record after filling the required fields.

 

does anyone familiar with this error ? it's pretty urgent so I'll appreciate it if anyone provided the solution. 

 

Thanks in advance.

 

 

Like 0

Like

2 comments

Greetings!
 

The issue is that if you remove the requirement for the "ReactionTimeUnit" and "SolutionTimeUnit" fields and leave them empty, you won’t be able to save the record. 
 

An error will occur:  
"Specified argument was out of the range of valid values. Parameter name: Index value is out of range"

 

These fields are mandatory because the entire out-of-the-box product logic of the Service relies on them being filled in.  

As a workaround, you can set default values for these fields, and everything will work fine.


Alternatively, you can build your application completely independent of the out-of-the-box functionality.


Regards,

Orkhan

Orkhan,

Much appreciated!

Show all comments

I want to explore more on view model properties but could not found  good article which describes the get and set properties of view model properties

Like 0

Like

1 comments
Best reply

Hello,

 

For detailed documentation on view model properties, please refer to the following link:

Data handling basics

Hello,

 

For detailed documentation on view model properties, please refer to the following link:

Data handling basics

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

I am working with Freedom UI in Creatio and I need to populate a virtual lookup with data. I have defined the ViewModel attributes and configured the view, but when I try to populate the lookup with data using a handler for crt.HandleViewModelInitRequest, the lookup does not display the data. I have used a custom array of data to populate the lookup, but it seems to be incorrect. Could you provide an example or guidance on how to correctly populate a virtual lookup with data in Creatio Freedom UI?


      {
               "operation": "insert",
               "name": "VirtualSchemaLookup",
               "values": {
                   "layoutConfig": {
                       "column": 1,
                       "row": 1,
                       "colSpan": 1,
                       "rowSpan": 1
                   },
                   "type": "crt.ComboBox",
                   "label": "Virtual Schema Lookup",
                   "labelPosition": "auto",
                   "control": "$VirtualSchemaLookup",
                   "listActions": [],
                   "showValueAsLink": true,
                   "controlActions": [],
                   "visible": true,
                   "readonly": false,
                   "placeholder": "",
                   "tooltip": "",
                   "valueDetails": null
               },
               "parentName": "GeneralInfoTabContainer",
               "propertyName": "items",
               "index": 0
           },

viewModelConfigDiff:

       "VirtualSchemaLookup": {
                       "dataValueType": Terrasoft.DataValueType.LOOKUP,
                       "isCollection": false,
                       "value": null
                   },
                   "VirtualSchemaLookupList": {
                       "dataValueType": Terrasoft.DataValueType.COLLECTION,
                       "isCollection": true,
                       "value": []  
                   }, 


 {
               request: "crt.HandleViewModelInitRequest",
               handler: async (context, next) => {
                   try {
 var resultConfig = {
                           "1": {
                               value: "1",
                               displayValue: "Test Schema 1",
                               name: "TestSchema1"
                           },
                           "2": {
                               value: "2",
                               displayValue: "Test Schema 2",
                               name: "TestSchema2"
                           },
                           "3": {
                               value: "3",
                               displayValue: "Test Schema 3",
                               name: "TestSchema3"
                           }
                       };

                       if (context.$context.attributes && context.$context.attributes.VirtualSchemaLookupList ) {
                           context.$context.attributes.VirtualSchemaLookupList = resultConfig;
                         console.log(context.$context);
                       } else {
                           console.error("error");
                       }
                       await next?.handle(context);
                   } catch (error) {
                       console.error("Ошибка при инициализации модели:", error);
                   }
               }
           }

Despite filling the VirtualSchemaLookupList attribute with data, the lookup does not display the data when the page is loaded

Could you provide an example or detailed guidance on how to correctly populate a virtual lookup with data in Creatio Freedom UI?
Thank you!

Like 0

Like

2 comments

Hello Dmitriy,

This article should help you to display the needed data:

https://community.creatio.com/articles/virtualcolumn-lookup-field

Also please check how to set up a detail with fields, especially paragraph 6 "Make the detail fields virtual":

https://academy.creatio.com/docs/8.x/dev/development-on-creatio-platfor…;

Additionally, the article below has examples of filtering in the lookup field:

https://community.creatio.com/questions/how-add-filter-virtual-lookup
 

Anhelina,

The question was on Freedom UI and on the Classic UI, all your links are not related to the issue

Show all comments

Hi

 

In Creatio 8.1.2 I think Creatio add a new user setting called: Number format.

 

All other user settings had a Default value to configure in System Settings, but I didn't found one to set a default value to this setting.

 

Is there one already or is it scheduled for a near future version?

 

 

Thanks in advance

 

best regards

Julio Falcón

Like 0

Like

4 comments

Hello,

It is now possible to change the number format for the user on the user profile page, since version 8.1.2. There are no settings to set default for all users format, as they can do it them self in their user profile settings.

Best regards,
Ivan

Ivan Savenko,

Please could you add this requirement to the to-do list?

 

All other user profile configurations have a system setting to define a default, why should this new one be different?

Hi any update on this feature , We really do not want to edit every account one by one to  get consistent number format

Is there any update on this setting for all employees?

Show all comments

Hello,

 

I am trying running into a problem in my instance where I'm encountering a problem when I publish and compile where I receive a message saying that "One or more errors occurred. Sequence contains more than one matching element"

 

I am unclear as to what this message could be referring to. There error is unclear and I'm unsure as to how to proceed without more information. Has anybody encountered this problem before?

Like 0

Like

3 comments

If it's a compilation error, maybe there is more details in the Compilation errors? In the lookups section, add the "Compilation errors" object to view the contents.

Ryan

Hello Kevin

In my case, the problem was caused by a duplicate lookup object: deleting the duplicate solved the problem.

Jasmine,

Greetings,

The issue may be caused by having two schemas with the same name within one package. Please check this logic.

If this is not the case, kindly submit a support request to support@creatio.com and provide the logs when reproducing the issue, especially if it is on-site.

We will review and offer assistance.

Regards,
Orkhan

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