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.