Время создания
Filters

I have a homepage that uses the Tabbed Page with progress bar template called "Dashboard Homepage". When I try setting up a user workplace and setting it as the homepage, it gets stuck loading, and never shows the dashboard. I've tested this with a brand new template page, and get the same issue.

When I set it to a page that uses the list template, it works perfectly fine. I imagine this has something to do with the functionality a page offers, but am awfully confused.

Any reason as to why I can't just set a Tabbed Page with Progress Bar as the homepage of my app?

Like 0

Like

0 comments
Show all comments

Hi Team,

I need to validate 'Amount' field as not having -ve number. But if this field is hidden, then this validation should not work.

------------------------------------------------------------------------------------------------------------------

"validators": {

    "ValidateFieldValue": {

        "type": "usr.ValidateAmountForPositiveValue",

        "params": {

            "message": "Amount must be greater than 0(Zero)."

        }

    }

}

 

"usr.ValidateAmountForPositiveValue": {

    "validator": function (config) {

        return function (control) {

            if (visibilityProperty && control.value < 0) {

                return {

                    "usr.ValidateAmountForPositiveValue": {

                        message: config.message

                    }

                };

            }

        };

    },

    /* Validator parameters. */

    "params": [

        {

            "name": "message"

        }

    ],

    "async": false

}

------------------------------------------------------------------------------------------------------------------

 

Query: How can I get this `visibilityProperty` of field & use it in validator?

(I've used Business Rule to show/hide element instead of custom attribute)

Like 0

Like

1 comments

Hello,

Use the approach I described here https://community.creatio.com/questions/how-read-custom-attribute-or-ot…, but also add the 

const isCodeVisible = await request.$context.getControl("Code").visible;

into the code to check if the "Code" column is visible or no.

Show all comments

How I solve this Issue .i make build but failed and give me compile error

Like 0

Like

0 comments
Show all comments

Hi there, I would like to know how much time it generally takes for domain verification for bulk emails in Creatio.

Like 0

Like

2 comments

Hello, 

Domain verification for bulk emails typically takes up to 24 hours, depending on your DNS provider's propagation speed. 

If you need assistance with verifying your domain or setting up DNS records, feel free to create a request to our support team, and we will be happy to help. 

Hi Hanna,

Thank you, for your response. But for us it's already been more than 4 days still our domain in Creatio is showing not verified.

Show all comments

Hi Team,

I need to validate lead closing date that should not be lesser than lead created date. For this I need to fetch value of 'request.$context.LeadDS_CreatedOn_gjir2pi' in validator directly or using some custom attribute. But I'm not able to fetch value or attribute in validator.

Also, I used global variable 'CreatedOnLeadDate' in LeadPage & populating this in handler method. But the issue is validator is executed before handler method, hence getting createdOn value as:
"Thu Jan 01 1970 05:30:00 GMT+0530 (India Standard Time)" that is wrong
 

Handler Method:

Handler Method

Validator Method:

console

Is there any solution to accomplish this need?

Thanks in Advance

 

 

Like 0

Like

2 comments
Best reply

Hi.

As an option, you can enable and disable validators using the enableAttributeValidator and disableAttributeValidator methods. For example I have two text columns on the page "INN" and "Code". Here is the handler that will enable the validator in case the INN and Code values are similar and the Code is filled in (I could also add the check if the innValue is filled in):

{
				request: "crt.HandleViewModelAttributeChangeRequest",
				handler: async (request, next) =&gt; {
					if (request.attributeName === 'INN' || request.attributeName === "Code") {
						const codeValue = await request.$context.Code;
						const innValue = await request.$context.INN;
						if (codeValue &amp;&amp; codeValue === innValue) {
							request.$context.enableAttributeValidator('INN', "TaxpayerNumberValidator");
						} else {
							request.$context.disableAttributeValidator('INN', "TaxpayerNumberValidator");
						}
					}
					return next?.handle(request);
				}
			},

Here is the validator:

validators: /**SCHEMA_VALIDATORS*/{
			"usr.TaxpayerNumberValidator": {
				"validator": function (config) {
					return function (control) {
						return {
							"usr.TaxpayerNumberValidator": { message: config.message }
						};
					};
				},
				"params": [
					{
						"name": "invalidNumber"
					},
					{
						"name": "message"
					}
				],
				"async": false
			}
		}/**SCHEMA_VALIDATORS*/

and here is the validator added to the attribute:

"INN": {
						"validators": {
							"TaxpayerNumberValidator": {
								"type": "usr.TaxpayerNumberValidator",
								"params": {
									"invalidNumber": "123",
									"message": "Invalid number"
								}
							}
						}
					},

So I don't have any conditions in the validator, validator will always return the error message. But we control the availability of the validator in the HandleViewModelAttributeChangeRequest. And using this approach you can compare values and enable\disable the validator based on the result of the compare.

Hi.

As an option, you can enable and disable validators using the enableAttributeValidator and disableAttributeValidator methods. For example I have two text columns on the page "INN" and "Code". Here is the handler that will enable the validator in case the INN and Code values are similar and the Code is filled in (I could also add the check if the innValue is filled in):

{
				request: "crt.HandleViewModelAttributeChangeRequest",
				handler: async (request, next) =&gt; {
					if (request.attributeName === 'INN' || request.attributeName === "Code") {
						const codeValue = await request.$context.Code;
						const innValue = await request.$context.INN;
						if (codeValue &amp;&amp; codeValue === innValue) {
							request.$context.enableAttributeValidator('INN', "TaxpayerNumberValidator");
						} else {
							request.$context.disableAttributeValidator('INN', "TaxpayerNumberValidator");
						}
					}
					return next?.handle(request);
				}
			},

Here is the validator:

validators: /**SCHEMA_VALIDATORS*/{
			"usr.TaxpayerNumberValidator": {
				"validator": function (config) {
					return function (control) {
						return {
							"usr.TaxpayerNumberValidator": { message: config.message }
						};
					};
				},
				"params": [
					{
						"name": "invalidNumber"
					},
					{
						"name": "message"
					}
				],
				"async": false
			}
		}/**SCHEMA_VALIDATORS*/

and here is the validator added to the attribute:

"INN": {
						"validators": {
							"TaxpayerNumberValidator": {
								"type": "usr.TaxpayerNumberValidator",
								"params": {
									"invalidNumber": "123",
									"message": "Invalid number"
								}
							}
						}
					},

So I don't have any conditions in the validator, validator will always return the error message. But we control the availability of the validator in the HandleViewModelAttributeChangeRequest. And using this approach you can compare values and enable\disable the validator based on the result of the compare.

Hi Oleg Drobina,

It's working now, Thanks for your support 👍

Show all comments