Remove validation on lookup when we set the field value - Ne

Posted by IramK on 25-Nov-2015 03:30

Hello,

I have a required lookup field and if the field value is not set for a required lookup field it has a validation message saying "field value must be specified" which is correct. I am setting its field value using rbf_setFieldValue(..) and I have a situation in which I am setting its field value on change of a picklist field value. If the field is empty and the validation has ran, the validation message is there. However now at this stage if I change the picklist field value and set the lookup field value (onchange) programmatically, the validation message doesn't go away because I am not going out of focus on the field. Is there a solution to this such that I can run the validation on the field again after using rbf_setFieldValue? Is this issue known? Kindly let me know.

Cheers.

Iram

Posted by Mohammed Siraj on 25-Nov-2015 05:09

See your point Iram. Ideally, rbf_setFieldValue should also trigger validation (& onchange event).

Will address this in forthcoming release. Most probably 4.0.4.

All Replies

Posted by Mohammed Siraj on 25-Nov-2015 04:39

Hi Iram,

Will limit running the validation to onblur event on field & on form submit.

For such scenarios, wherein you are programmatically modifying the field value, you can also explicitly fire validation for that particular field.

rbf_getFieldContext(fieldName).validate(); .  

Posted by IramK on 25-Nov-2015 05:04

Hello Mohammed Siraj,

That's actually quite interesting to know. Thanks for that solution and it does work. Do you reckon this is permanent solution to this issue though?

Cheers.

Iram Khan

Posted by Mohammed Siraj on 25-Nov-2015 05:09

See your point Iram. Ideally, rbf_setFieldValue should also trigger validation (& onchange event).

Will address this in forthcoming release. Most probably 4.0.4.

Posted by IramK on 25-Nov-2015 05:13

That's correct and agreed. Shall wait for the release then :)

Posted by Chandrasekhar Gontla on 25-Nov-2015 06:58

Hi Iram,

It is a known issue.

But, I found this issue in a different way. i.e.,

Field level validation error message is still showing up though we set value through rbf_setFieldValue() when the field is first one in the form

Thanks and Regards,

Chandu.

This thread is closed