Freedom UI – Validator cannot read lookup-related attributes (model.get undefined)
Hi,
I am implementing a custom validator in a Freedom UI modal page.
The validator needs to compare Pickup Quantity with two lookup-related attributes:
UsrTotalPendingQuantityUsrPickupLimitPerDay
These are loaded through ForwardReference in the data source.
Inside the validator, when I try:
model.get("<attributeName>")
the values are undefined, and console shows:
Model not ready Pending/Limit not loaded yet
So the validator runs before the ForwardReference attributes are available.
My question:
What is the correct way in Freedom UI to access lookup-related (ForwardReference) attributes inside a validator?
And how can I trigger validation only after the lookup value and its related attributes have finished loading?
Thanks in advance
Like
Hello,
Currently, the validators have an issue when they are working with other columns. Please take a look at this discussion, in it, you can find an example of how to bypass it.
https://community.creatio.com/questions/how-configure-field-validation-…