Is it possible to pass attributes from a page into a validator as a parameter for use in its logic? I'm trying to pass the Id of the record into an async validator which should then query the database for the record to check whether it is in a valid state to be saved, but I don't seem to be able to pass the attribute in as a parameter and it isn't available by default in the validator. I've tried the below:
But it just passes in the literal string "$Id" instead of the value of Id. I don't see anything about passing dynamic values into validators in the documentation.
Hello, Currently, this task is in the development and now it is impossible to do so. The ability to add dynamic parameters will be available in the future versions.
Any idea when it's going to be available? I have a couple of custom validations that test for a regEx expression and I'd like to be able to store those regEx expressions as a setting instead of hard coding them in the code.
Hello, Unfortunately, we cannot say in which version this functionality will be implemented, as our development team is working on tasks according to their priority, which in turn is determined by the number of requests with this need.
There is a requirement in which I have to verify a specific condition based on fields and lookup values on clicking the SAVE button. I am using ESQ in edit page schema while overriding asyncValidate method to achieve this.
But, I am unable to figure out which commands can be used to get further field values of that lookup, and then compare it. For reference, here in my case, Contact lookup is on Custom section and I want to fetch Department value of it .
Hi, I am overriding asyncValidate method with multiple filters (A AND C) AND (B AND C). Here C is the field from the same object, A and B are the fields from other object using ESQ.
I have created a separate function to achieve this as below :
ConditionCheck : function(ID, BUnit, esq)
{
var esqFirstFilter = esq.createColumnFilterWithParameter(Terrasoft.ComparisonType.EQUAL, "Id",ID);
var esqSecondFilter = esq.createColumnFilterWithParameter(Terrasoft.ComparisonType.EQUAL,"Department.Name",BUnit);
And, I have used this function to call (A AND C) and (B AND C) separately as:
var result1 = this.ConditionCheck (A, C, esq);
var result2 = this.ConditionCheck (B, C, esq);
Now, I am not sure how we can combine the result1 and result2 in asyncValidate method such that it will only going to save when both result1 and result2 holds "true". Please help me on this.
In Edit Page, there is asyncValidate method which validates the record asynchronously before saving. Now I want the same on deleting of records on detail. Is there any asyncValidate method on detail grid I can inherit? I want to perform asynchronous validation before deleting records on detail grid.