Set field to Read Only after data filled

I want the Need By date on the SO to be set to Read only once the date is set. I don’t think i can do that in a BPM. I am not a coder by trade. Can anyone tell me how to set a field to be read only once it is populated.

thanks Kim

Could a data directive set it back to what it was?

Condition would be something like CHANGED AND prior value <> “”

If the prior value isn’t available in a DD, you could make a DD to copy the value from NeedBy to Date01 when it is first set, and another to copy from Date01 back to NeedBy, when it changes.

I think i am following you.

I just want the user to be able to set a date in Need By when the SO is created. Once it is set or saved it locks it to read-only.

One thing to consider… Can different lines (or releases of the same line) have different initial “first” NeedBy dates? Or do you want them to always match the Header NeedBy?

Right now they want the date to be the same.

I would think if they added a line that Need by would be open to set until a date is filled in.

I would create a method directives in SalesOrder.Update with the following values:

Condition: There is at least one updated field in the TTOrderHed table and the TTOrderHed.NeedByDate <> Null (there’s a particular character you have to use for date fields, I can’t remember it off the top of my head though) AND the ttOrderHed.NeedByDate of the changed row is not equal to OrderHed.NeedByDate

Action: Raise Exception

Note: I believe this would work, but you would definitely have to test it to double check.