If you add a new record via the UI, the key feilds become disabled after you save the record. I am creating a new record via code, the record is created and saved OK, but the key fields do not become read only.
By “Read Only”, are you referring to the ability to change the data in the database, or that the field allows a new value to be entered?
For example, the Order Entry form uses the OrderNum as the key field. After loading a an Order, you cannot change the Order number of that record. But you can type in the OrderNum field, which doesn’t change the fields value of the current record, but rather fetches a different record.
I just mean the UI lets you type in new values - if you change the last key field it asks if you want to create a new record. This is fine behavior for when no record is loaded, but the normal behavior for the form (UD100) is that these fields are read only for existing records.
The UD forms can behave kind of weird. I would use a row rule to just set those fields as read-only with ext props and use a custom condition for rowmod != A