The code provided by @harutyungevorgyan should work.
What might cause the issue is name of the field (I’ve seen similar issues with fields not adhering to “usr” prefix convention) or different event used to define SetEnabled
- in the base graph I see multiple instances of PXUIFieldAttribute.SetEnabled(sender, row, false);
for EPActivityApprove
, which disables all fields. Generally it is used to disabled all fields except 1-2 specific fields - which are then enabled like this: PXUIFieldAttribute.SetEnabled<EPActivityApprove.hold>(sender, row, true);
.
Depending on the event you used, your instructions might become overridden by this disable all command.
Please also check attributes on your field, maybe you set [PXUIField(Enabled = false)]
by accident.
I agree with @harutyungevorgyan, it’d be easier for us to help if we can see the code and markup changes.