Like 1

Like

1 comments
Best reply

Hello Jerome,

The behavior you describe is not an error and corresponds to the basic logic that is inherent in all fields. If the field has the "Required" property and the field type is Number or Fractional, then a value of 0 or 0.00 is an empty value, that is, the field is not filled. Thus, when you try to save a card with 0.00 in a numeric field with the required property, the system will display a message that the field must be filled with a value. The values ​​0 or 0.00 is an empty values, they are displayed in empty fields so that users can visually understand the format of the field. We recommend you remove the mandatory filling from the required field so that you can save the card with a zero value in the field. We will broadcast the information received from you to the development team to consider the possibility of changing the logic of the mandatory filling of numeric fields.

Best Regards,
Kate

Hello Jerome,

The behavior you describe is not an error and corresponds to the basic logic that is inherent in all fields. If the field has the "Required" property and the field type is Number or Fractional, then a value of 0 or 0.00 is an empty value, that is, the field is not filled. Thus, when you try to save a card with 0.00 in a numeric field with the required property, the system will display a message that the field must be filled with a value. The values ​​0 or 0.00 is an empty values, they are displayed in empty fields so that users can visually understand the format of the field. We recommend you remove the mandatory filling from the required field so that you can save the card with a zero value in the field. We will broadcast the information received from you to the development team to consider the possibility of changing the logic of the mandatory filling of numeric fields.

Best Regards,
Kate

Show all comments

We are looking for a for a way to impose a character limitation on a string value that is different than the standard settings. 

 

For example, the user enters a job number as a string and we want to restrict entry to only 10 characters. Is there a way to do this? Obviously not OOTB but with some customization?

Like 0

Like

1 comments

There is a possibility to setup a field validation and this approach is described in this Academy article.

 

Best regards,

Oscar

Show all comments

Hi All,

I need to put validation to restrict the lookup column "Name" to a certain number of characters(not 50,250,500). Can anyone suggest how can i achieve that?

Like 1

Like

3 comments
Best reply

Hello rajat,

 

You can add an event on the object itself through the configuration:

https://prnt.sc/LIjTKY0mxzdz

 

Get the value of the Name field and make sure that it isn't longer than x characters.

 

 

Kind regards,

Yosef

Hello rajat,

 

You can add an event on the object itself through the configuration:

https://prnt.sc/LIjTKY0mxzdz

 

Get the value of the Name field and make sure that it isn't longer than x characters.

 

 

Kind regards,

Yosef

Hi yosef,

I am not able to add anything in that business process. Can you guide me how  to achieve the above objective

 

rajat patidar,

 

Make sure the object exists in your package (custom package is the default one) and then use an event subprocess.
Here's an example on how to work with server side code:

https://academy.creatio.com/docs/developer/interface_elements/record_page/field/add_auto_numbering_to_the_field#title-1349-12

 

You can then follow this logic:

https://academy.creatio.com/docs/developer/interface_elements/record_page/field/add_the_field_validation

 

 

Kind regards,

Yosef

Show all comments

Hello

 

I was trying to validate email format and phone number format in activity section in mobile application but could not find anything.

Please provide me a way to validate these fields in mobile application.

 

Regards,

Malay

Like 0

Like

5 comments

Hello Malay,

Could you please provide us more detailed information on your business task? Could you share screenshots?

Thank you in advance!

 

Best regards,
Bogdan

Hello Bogdan,

 

Hello I want to apply validation for mobile number and email in activity section. For example, the phone number should be of 10 digits and only contain numbers and email format should be of the form abc@xyz.com.

 

I have used JavaScript for lead section to do it for the web version but how to do it for the mobile application?

 

Below is the screenshot of the mobile activity page where I want to apply this validation.

 

Regards,

Malay

Hello Malay,

You can use a custom business rule for this task. See here for an example: https://academy.creatio.com/docs/developer/mobile_development/mobile_ap…

For using the custom rule for validation, you can pass a third parameter to the callback function with a message (the validation message) and value (true or false indicating if validation passed or not).

For example:

var result = {};
if (passedTheTestAndIsValid) {
    result = {
        value: true
    };
}
else {
    result = {
        value: false,
        message: "The entered value is invalid"
    }
}
 
// now include the result in the callback
Ext.callback(callbackConfig.success, callbackConfig.scope, [result]);

Ryan

Ryan Farley,

 Thanks for share it. You have any example using esq query in custom business rules for validations?

Christian Kern,

 

1. File will be stored in configurations.

 

2. The main rule - the first word of business rule name should be the section name. Like "Contact", "Case", "Account". 

 

Best regards, 

 

Bogdan L.

Show all comments

Hi,

So have this default Opportunity Section which we edited to change the UI for creating a New Record (see image for reference). Then we change it in a way that choosing customer can only be through accounts, which we are having the prompt error actually.

Question
After checking all the previous version of OpportunityPageV2, I can't find anything that prompts this error, any thoughts/comments?

Like 0

Like

2 comments
Best reply

Hi,

I'm able to afford to fix my problem via the following code segment. I both declared this in minipage and pagev2 of opportunity.

          "Client": {
            "caption": {"bindTo": "Resources.Strings.Client"},
            "dataValueType": Terrasoft.DataValueType.LOOKUP,
            "multiLookupColumns": ["Account"],
            "isRequired": false
          },

Thanks a lot!

Hello Solem,

 

Hope my message finds you well.

 

You can check the Opportunity object and find the 'Customer' column, then disable the requirement for this field to be populated. Also, you can use Section Wizard / Page Designer to find the configuration for the mentioned column. Additionally, if you use the mini-page for the Opportunity section, there also need to disable the requirement for the Customer field.

 

Best regards,

Roman

Hi,

I'm able to afford to fix my problem via the following code segment. I both declared this in minipage and pagev2 of opportunity.

          "Client": {
            "caption": {"bindTo": "Resources.Strings.Client"},
            "dataValueType": Terrasoft.DataValueType.LOOKUP,
            "multiLookupColumns": ["Account"],
            "isRequired": false
          },

Thanks a lot!

Show all comments

Hi Team,

I would like to prevent selecting the future date in the date field.
Kindly help me with any insight on this.

Note: All the future date should be greyed out and is not able to select (if it is clicked it shouldn't be selected or populated in the date field).

 

 

 

Thanks in Advance!

Regards,

Bhoobalan P.

Like 0

Like

3 comments

Hi Bhoobalan,

 

Please use the column validator instead that will do the same task:

setValidationConfig: function() {
              this.callParent(arguments);
              this.addColumnValidator("UsrDatetime1",this.dateTimeColumnValidator);
            },
          	dateTimeColumnValidator: function(){
              console.log(this.get("UsrDatetime1"));
              var invalidMessage = "";
              console.log(this.getSysDefaultValue(Terrasoft.SystemValueType.CURRENT_DATE_TIME));
              if (this.get("UsrDatetime1")>this.getSysDefaultValue(Terrasoft.SystemValueType.CURRENT_DATE_TIME)){
               	invalidMessage = this.get("Resources.Strings.ErrorMessage");
              } 
                return {
                  invalidMessage: invalidMessage
                };
              },

Just replace the UsrDatetime1 column with your date\rime column name and also create a localizable string with the "ErrorMessage" code.

 

Best regards,

Oscar

Oscar Dylan,

Thanks much for the precious response!

But still we could select the future date value, And after validation we throw a error message below the corresponding field name. 

We need to block selecting the future date, which could be possibly achieved via Jquery as below,

$("#dateField").datepicker({
    maxDate: 0
});

How could we achieve the same in our CREATIO Date field ?

Regards,

Bhoobalan P.

Bhoobalan Palanivelu,

 

This validator will also return a validation message upon saving a record with an incorrect date, so it's not possible to select the date\time grater than the current date\time:

And this is much easier than creating a custom logic for the date selector modal window so please use this approach.

 

Best regards,

Oscar

Show all comments

I am trying to implement validation logic in client module edit page of a section.

I want to save the column value of UsrAttributeName (a lookup) into a variable.

To do this, I am using this.get("UsrAttributeName").displayValue. But when Page is loaded it hangs and console shows the error 

message: Uncaught TypeError: Cannot read property 'displayValue' of undefined 

Like 0

Like

2 comments

Hello! 

 

1. To add validation use this.addColumnValidator method in setValidationConfig method.

Please, find the example in the Academy article: https://academy.creatio.com/documents/technic-sdk/7-16/how-add-field-va…

 

2. If the column value is not defined you cannot call for its properties. Check if the column has value:

var attribute =  this.get("UsrAttributeName");
var attributeDisplayValue = attribute  && attribute.displayValue;

 

Please, let us know in case any additional information is required. 

 

Best regards,

Olga. 

Olga Avis,

Hi 

 

After debugging it turns out undefined is coming because Entity/Page is not fully loaded or when I create a new record then all fields are empty.

I could use your suggested way to assign attribute value to a variable but that would not be able to work if entity/page is not fully loaded.

 

So I used a flag in attributes with default value false and set it to true in OnEntityIntilized method.

Then I checked the flag, if it is true then the validation method will run.

 

Thanks

Ram

Show all comments

Hello

Creatio by default allows a user to choose between 50, 250 and 500 as max lengths of a Text column from the Object designer. We have a use case where we have to set a specific max length for a field Eg Text (80 charecters). Find below a few questions in this regard 

1. Is there a way to set this custom max length for that object from the Creatio GUI?

2. If #1 is not possible, Can this be set directly at the database/data model layer? If Yes, How? Also, will such a limit automatically bubble upward to the UI? ie If the field is set to 80 charectars and an input field is linked to it, Does a validation of max 80 charectars on the UI automatically apply?

3. The following link provides guidelines on how to custom implement an input validation on the UI. Will such a validation also work on Creatio Mobile?

Like 0

Like

2 comments

Hello. Would really appreciate some help on this question

M Shrikanth,

 

1. There is no way to set the custom max length for a field from the Creatio GUI.

 

2. It's possible to set the custom max length for a field via development by creating a field validator. Please find the examples in the article on Academy:

https://academy.creatio.com/documents/technic-sdk/7-15/how-add-field-validation?_ga=2.27542716.1082264901.1584023961-1276886288.1584023961

 

3. The validation functionality must be developed in the mobile application separately. You need to create a custom business rule in the mobile for that. The guidelines can be found in the article on Academy:

https://academy.creatio.com/documents/technic-sdkmob/7-15/custom-business-rules-mobile-application

Show all comments

Is there a way to make a thread sleep (like "Thread.Sleep(nnn)" in C#) in order to make it possible to wait for a property set by an ESQ return, such as the code example below ?

...

this.set(("EsqOk", false);

esq.getEntityCollection(function(result) {

     ...

     // ESQ return

     ...

     this.set(("ValidationMessage", "xxxxxxxx");

     this.set("EsqOk", true);

     }

}, this);

// main thread flow

while (!this.get("EsqOk") {

     this.Thread.Sleep(500);

}

return {

     invalidMsg: this.get("ValidationMessage")

};     

 

Like 0

Like

1 comments

No. It's a bad idea to stop the application for data selection. It's better to use masks. Like MaskHelper.showBodyMask and MaskHelper.hideBodyMask

Show all comments