Hello,

I'm trying to add an auto-numbering field in the Leads section following the instructions here: https://academy.creatio.com/documents/technic-sdk/7-13/how-add-auto-numbering-edit-page-field

 

I've made the 2 new system settings required:

I've also made a replacing Lead object in the package I'm working on and added a new event trigger before the record is added:

The process triggered by this signal on the object is set up with the expected elements:

With conditional logic:

One thing I think is missing is how to tie the new system settings into this process.  Is there a schema or input I need to update for this?
 

Also, do the process element parameters need to be populated on the user task?

Thank you for your help finding what needs to be fixed to get this working!

Like 1

Like

2 comments
Best reply

Is your column on the Lead object really called "CreatioNumber"? (the code for the column)

You've verified that your User Task is really named "LeadNumberCreation"? (click the three-dot button on the top right and switch to advanced mode)

As for the system settings, the user task locates and uses those. 

As a side note, the new method is much easier (it works for classic as well as Freedom since it's simply added as a default value for the column). See https://customerfx.com/article/working-with-autonumber-fields-in-creatio/

Ryan

Is your column on the Lead object really called "CreatioNumber"? (the code for the column)

You've verified that your User Task is really named "LeadNumberCreation"? (click the three-dot button on the top right and switch to advanced mode)

As for the system settings, the user task locates and uses those. 

As a side note, the new method is much easier (it works for classic as well as Freedom since it's simply added as a default value for the column). See https://customerfx.com/article/working-with-autonumber-fields-in-creatio/

Ryan

I obfuscated the real code numbers for these screenshots but the ones I'm using do match the field column code and the user task code so that shouldn't be the problem.
 

That's great to know there is a more simple way to create an autonumber field right on the object now though!  I tried it and it worked so that solution will work fine.

Thank you so much for your help!

Show all comments

Hello community!

 

I'm trying to filter contacts by unique keys from another system.

Currently, we are using 'eq' and 'or', but that has a limitation (the error states that only 100 nodes are supported in a filter).

After reading the oData 4.01 documentation that is linked in the creatio documentation here https://academy.creatio.com/docs/8.x/dev/development-on-creatio-platform/architecture/development-in-creatio/integrations#title-2088-10, I found the "in" operator, which might bypass this issue completely, so we wouldn't need to page through records.

 

However, I couldn't get it to run...my filter looks like this:
 

$filter=["QsTbisKey"] in ["47928","50447"]

But it returns an error:

{
    "error": {
        "code": "",
        "message": "An error has occurred.",
        "innererror": {
            "message": "The 'ObjectContent`1' type failed to serialize the response body for content type 'application/json; odata.metadata=none'.",
            "type": "",
            "stacktrace": "",
            "internalexception": {
                "message": "Object reference not set to an instance of an object.",
                "type": "",
                "stacktrace": ""
            }
        }
    }
}

 

I tried using all combinations of other brackets and single quotes but was unsuccessful.

 

Does anyone know how to do this?

 

Thanks and BR,

Robert

 

Like 0

Like

4 comments
Best reply

Hello,

The 'in' operator is not supported in OData 4 in Creatio.
At the moment, it is possible to use the operators that are available in the examples in the official Postman collection of the Creatio API.
We have registered a task to improve this functionality ('in' operator for Creatio OData 4 requests) in future releases of Creatio.
 

Correct filter for In operator OData 4.01 is usually like:

filter=Id in ('6f2efedd-9b25-43b4-9cb9-0ebe60a02a8a','72509ae9-7065-465c-b7c5-3d193b8fe768')

However, it produces the same result with Creatio OData. It's possible Creatio only implements OData 4.0 and not 4.01 (which introduced the In operator).
Might need a different approach like a configuration service that takes the like of values as a param and returns the results? Or if it would work to create a common parent record of the values that could be used to retrieve the results?

Ryan Farley writes:

Correct filter for In operator OData 4.01 is usually like:

filter=Id in ('6f2efedd-9b25-43b4-9cb9-0ebe60a02a8a','72509ae9-7065-465c-b7c5-3d193b8fe768')

However, it produces the same result with Creatio OData. It's possible Creatio only implements OData 4.0 and not 4.01 (which introduced the In operator).
Might need a different approach like a configuration service that takes the like of values as a param and returns the results? Or if it would work to create a common parent record of the values that could be used to retrieve the results?

 

Hi Ryan,

I did try that syntax already, but it didn't work.

Maybe someone from Creatio can shed some light on the implemented OData version?

 

Thanks,

Robert

Hello,

The 'in' operator is not supported in OData 4 in Creatio.
At the moment, it is possible to use the operators that are available in the examples in the official Postman collection of the Creatio API.
We have registered a task to improve this functionality ('in' operator for Creatio OData 4 requests) in future releases of Creatio.
 

Serhii Parfentiev,

Thanks for the information!

Since the documentation I linked explicitly points to the OData 4.01 version, it should be updated and the exact version should be mentioned to know what is supported and what is not.

 

Thanks,

Robert

Show all comments

Hello, I recently started working with Creatio Mobile. I have downloaded the files and was able to create the Creatio APK through the SDKConsole utility. I have a question: how can I add a page within the application? I see that most of the app is based on WebView. My goal is to import a library from Pub.dev (in my case, call_log) and implement it to display the data on a page within this app.

If anyone could help me, I would be very grateful. Thank you.

Like 0

Like

1 comments

Hello,
In the mobile application there is an abillity to open custom JS pages using the handler logic, an example of such handler:

const openCustomPageRequest: OpenCustomWebViewPageRequest = {
   type: 'crt.OpenCustomWebViewPageRequest',
   $context: request.$context,
   controllerName: 'Terrasoft.controller.MobileSyncLogPage',
   viewXClass: 'Terrasoft.view.MobileSyncLogPage',
   parameters: {
       "customParam": 1
   }
};
HandlerChainService.instance.process(openCustomPageRequest);

controllerName - class name of JS controller 
viewXClass - class name of JS view 
parameters - additional parameters of custom page. To get the parameter call this method inside the controller this.getPageHistoryItem().getRawConfig().customParam

This handler should be added via the remote module (see this article) and using the @creatio/mobile-common library enabling the feature EnableMobileSDK in the Features page.

Show all comments

Hi,

when I use Creatio in Polish language version, I often encounter system messages which are not properly translated. For example:

  • Field: "Nazwa kontrahenta". Error: Enter a value
  • Insufficient permissions to edit record in object "Zamówienie"

 

Is there any way to translate such system messages? Some of them seem to be defined in dll files, so it may be problematic.

Like 1

Like

1 comments

Hello,

We want to inform you that system pop-ups are part of the core logic, and it is not possible to change the language of system messages manually. The schema responsible for this is deeply hard-coded into the application core, making it impossible to modify or replace.
 

Additionally, we have notified our Localization team, and they have confirmed that they are aware of the issue. They are actively working on a complete translation into Polish, which is planned for future releases.

Best regards,
Antonii.

Show all comments

Hello,
When I log in to Creatio, then close the browser, reopen it, and try to access Creatio again, it turns out that I need to log in again. From what I understand, this is due to the fact that cookies are set to expire at the end of the session, so they are removed when the browser is closed. As a result, the system setting "UserSessionTimeout" is not being respected here. Is there any option to change this behavior?

Like 2

Like

1 comments

Hello,

 

When you close the browser, in this case, the value of UserSessionTimeout is generally not used. The browser, by default, should not delete cookies; this only happens if the user sets it up that way.

I also logged into the environment on a new browser with default settings, closed it, reopened it, and I was still logged into the environment, which is expected because the cookies still exist.

I would recommend checking the browser settings and how it handles cookies.

It seems that it's now easy to block third-party cookies, but our system stores third-party cookies, and, for example, in Chrome, this is called 'site data on the device,' where you can choose to clear everything when you close all windows.

Show all comments

I'm trying to set the current package for a freedom application.

However when I do, I get the following error.

"Unable to set the "???" package as the current package of the application. You lack permissions to edit the package."

What permission do I need to update to be able to fix this package?

Like 0

Like

1 comments

Hello,
This error may occur when you attempt to modify a package for which you are not listed as the maintainer. Modifying such packages is not permitted.

Show all comments

Hello 

 

I want to set up a validator in the field when the length is greater than 10 characters, it does not allow saving that record. To achieve this I am basing myself on the following example: https://academy.creatio.com/docs/8.x/dev/development-on-creatio-platfor…

Placing it in the following way but it does not work correctly.

 

validators: /**SCHEMA_VALIDATORS*/{
          /* Implement a custom validator type. */
    "usr.ValidateFieldValue": {
        /* Business logic of the validator. */
        "validator": function (config) {
            return function (control) {
                return control.MaxLength !== config.invalidLength ? null: {
                    "usr.ValidateFieldValue": { message: config.message }
                };
            };
        },
        /* Validator parameters. */
        "params": [
            {
                "name": "invalidLength"
            },
            {
                "name": "message"
            }
        ],
        "async": false
    }
}/**SCHEMA_VALIDATORS*/
 
 
 

 

/**SCHEMA_VIEW_CONFIG_DIFF*/,
		viewModelConfigDiff: /**SCHEMA_VIEW_MODEL_CONFIG_DIFF*/[
			{
				"operation": "merge",
				"path": [
					"attributes"
				],
				"values": {
					"UsrnumerodeserieDS_Name_zb3wye6": {
						"modelConfig": {
							"path": "UsrnumerodeserieDS.Name"
						},
                       /* The property that contains the list of attribute validators. */
                        "validators": {
                            /* Custom validator. */
                            "ValidateFieldValue": {
                                /* Validator type. */
                                "type": "usr.ValidateFieldValue",
                                "params": {
                                    /* The field value that triggers the custom validator. */
                                    "invalidLength": "10",
                                    /* The tooltip that Creatio displays when the field contains the value specified in the “invalidName” property. */
                                    "message": "Invalid name."
                                }
                            }
                        }
					}
				}
			}

 

Also at some point I modify the code and save it but when I re-enter it does not save the changes and removes what I placed

 

Like 0

Like

1 comments

Hello Laura,

The described situation reminds me that you may apply changes to the unauthorized window. If you relogging into the application - you have to close the Code editor page and open it again after each new login, then changes will be applied.

Please try to modify the code according to the given recommendations and reply to my message if the error persists with additional details about the Error you see.

Show all comments

Hi Community,

 

I have to create a concatenated field based on two other fields in the object. Ex. Officer full name from officer first name and officer last name. Is there a way to do it in Creatio? Thanks in advance!

Like 0

Like

3 comments

An easy approach is to create a process that triggers on the record being added or being updated in the officer first name or officer last name fields. Read the record to get the values, then update it with the value concatenated. 

Entity-level calculated fields would be so helpful for these kinds of use cases. Needing to create business processes manually for every calculated field is quite cumbersome and can be the source of issues, and with the aim being less code, having configurable calculated fields at the entity level would surely be a win!

Harvey Adcock,

Completely agree. I would love for these types of values to be completely virtual and simply return the results of a calculation rather than be stored in the database.

Show all comments

Hi Team,

 

Could anyone please help me achieving the things below?

 

I have added two custom attributes in the client module.

 

One of lookup type and the other for text. As soon as the user selects the value in the Title Dropdown, the Description text field should be auto-populated with the corresponding value of description being fetched from a data source of Title.

 

The source lookup is as follows:

 

attributes: {

 "UsrTitle": {
         dataValueType: Terrasoft.DataValueType.LOOKUP,
         type: Terrasoft.ViewModelColumnType.VIRTUAL_COLUMN,
                  isSimpleLookup: true,

                   referenceSchemaName: "UsrTitle",

                   isRequired: true,
       },

          "UsrDescription": {
         dataValueType: Terrasoft.DataValueType.MAXSIZE_TEXT,
         type: Terrasoft.ViewModelColumnType.VIRTUAL_COLUMN, 
         value: ""
       }

}

 

    diff: [
                
                {
                    "operation": "insert",
                    "name": "MyMenu",
                    "propertyName": "items",
                    "values": {
                        "generateId": false,
                        "itemType": Terrasoft.ViewItemType.CONTAINER,
                        "items": []
                    }
                },
      
              {
         "operation": "insert",
         "parentName": "MyMenu", // The container where the input box will be added
         "propertyName": "items",
         "name": "UsrTitle",
         "values": {
           "bindTo": "UsrTitle", 
           "labelConfig": {
             "caption": "Title"
           },
         },
           "bindTo": "UsrTitle",
                    
                "enabled": true,
                    
                "contentType": 3
       },
                  
            {
         "operation": "insert",
         "parentName": "MyMenu", 
         "propertyName": "items",
         "name": "UsrDescription",
         "values": {
           "bindTo": "UsrDescription", 
           "labelConfig": {
             "caption": "Description"
           },
            "contentType": 0,
        "layout": {
            "column": 4,
            "row": 5,
            "colSpan": 20,
            "rowSpan": 4
        },
           "controlConfig": {
             "placeholder": "Enter your text here"
           },
           "classes": {
             "wrapClassName": ["custom-input-box-class"]
           }
         }
       },
         {
       "operation": "insert",
       "parentName": "MyMenu",
       "propertyName": "items",
       "name": "MainContactButton",
      
       "values": {
      
           "itemType": Terrasoft.ViewItemType.BUTTON,
         
           "caption":"Create Ticket",
           
           "enabled": true
       }
   },
 ]

 

 

Please note that this is a custom client module which does not belong to a section, hence not able to achieve this using the OOTB business rules. Kindly help!

 

Thanks,

Sarika

Like 0

Like

2 comments
Best reply

First of all, you'll need to have a change event for when the lookup attribute it selected, add something like this to the lookuip attribute: 

"UsrTitle": {
    dataValueType: Terrasoft.DataValueType.LOOKUP,
    type: Terrasoft.ViewModelColumnType.VIRTUAL_COLUMN,
    isSimpleLookup: true,
    referenceSchemaName: "UsrTitle",
    isRequired: true,
    onChange: "getTitleDescription"
}

Then, add the getTitleDescription method to the methods. When a value is selected this will get called and you can go retrieve the description via an EntitySchemaQuery to set in the other attribute:

getTitleDescription: function() {
    var title = this.get("UsrTitle");
    // now do an esq to get the description using title.value and then set in the description attribute
}

You could try adding the Description to the lookup attribute's lookupListConfig to avoid the esq, but I am not sure if that works for a virtual lookup attribute. However, doing an esq there would work fine.

Ryan

First of all, you'll need to have a change event for when the lookup attribute it selected, add something like this to the lookuip attribute: 

"UsrTitle": {
    dataValueType: Terrasoft.DataValueType.LOOKUP,
    type: Terrasoft.ViewModelColumnType.VIRTUAL_COLUMN,
    isSimpleLookup: true,
    referenceSchemaName: "UsrTitle",
    isRequired: true,
    onChange: "getTitleDescription"
}

Then, add the getTitleDescription method to the methods. When a value is selected this will get called and you can go retrieve the description via an EntitySchemaQuery to set in the other attribute:

getTitleDescription: function() {
    var title = this.get("UsrTitle");
    // now do an esq to get the description using title.value and then set in the description attribute
}

You could try adding the Description to the lookup attribute's lookupListConfig to avoid the esq, but I am not sure if that works for a virtual lookup attribute. However, doing an esq there would work fine.

Ryan

Ryan Farley,

 

Thanks. it worked.

Show all comments

Hi, 

 

I need to set a complex filter for a grid. How do I create a filter in JS and set it to a list in a page in freedom?

 

Best regards, 

 

Javier 

Like 0

Like

1 comments

Have you tried adding a crt.LoadDataRequest handler to dump request.dataSourceName out to the console to see if you can determine the name of the dataSourceName attriubute the list uses - and that it does fire that request? I assume it triggers this request when it get's it's data - similar to how lookups do, see https://customerfx.com/article/dynamically-filtering-a-lookup-on-a-creatio-freedom-ui-page/

Assuming it does and once you know the name of the dataSourceName it uses for the request you could add the conditions.

Alternatively, I believe you can add the filter conditions directly in the datasource in the viewModelConfigDiff, but you'd need to know the attribute name used in that scenario as well. Something like https://academy.creatio.com/docs/8.x/dev/development-on-creatio-platform/front-end-development/freedom-ui/data-sources/data-processing#title-2438-3

Ryan

Show all comments