Validation of Mandatory Fields In v5 is Flawed


I am just going through the v5 in my test environment and I found the following scenario which makes the validation criteria for mandatory fields as flawed. Here is scenario:

I have a field in SO, which has is pulled from the Customer Master. We have made this field’s level to say like level 1.

Now when we pull the customer in the SO, the field is pulled via the cur_frm.add_fetch command in the custom script.

Now this level 1 field is not editable due to permission manager for the user since we want the Customer DB to be correct, so now in V5 we would get a “Mandatory field Validation Error”, which never used to happen in v4.

I guess the system should allow this kind of a scenario as we cannot hide the mandatory field.
Can someone please let me know if this would be implemented in v5 or should I make a custom validation for such fields

Permissions exist for a reason :slight_smile:

Why not set the field as “read only” (you can also set it via the property if not fieldtype)

The problem with read-only is that what if that field is NULL in the master from where its being pulled.

Suppose I have customer with TIN number field as NULL, then that field would not be pulled in the Sales Order or the transaction.

I basically want to ensure that the field is NOT Empty in the master itself and hence I had made those fields are non-editable and still left them as Mandatory.

Can you suggest a way that I can ensure that those fields are not left empty in the master, apart from the server side script to check those fields in Masters.

I guess add a custom validation via script?

Rolling back permission checks would be a bad idea.

Thanks Rushabh.
I will add custom validation