Easier way to mark all form fields read-only after save?

On a UD-form, I need to mark every field (about 40-50 of them) read-only after saving the record (and not being able to edit again after retrieving). Is there an easier way of doing this to doing other than the SetExtendedProperty on each and every field?

There is a IsReadOnly flag on the Form level. Just set that to true, and change it on AfterGetNew back to False.

1 Like

Thank you for the response, but how do I use it? According to the “Object Explorer” there is no form read-only property.

Based on the value of CheckBox, I am using the Extended Properties to mark every control on the form as read-only. This does works, but very cumbersome.

UD101Form.IsEpiReadyOnly = true;

Jose. That worked perfectly!..Seriously, how do you know these things?! (when there is no documentation about this anywhere).

In any case, it doing what I needed now…

hehe @tomdomurat been doing this for a long time :wink:

One comment here that is not that important but you shouldn’t have to use csm.GetNativeControl reference you should have a local instance of the form available at the customization level by just referencing the form
UD101Form.IsEpiReadOnly for what it’s worth