How To Block Column In Acumatica Grid Or One Value In Column
Hello,
I want to share with you how to block some columns in Acumatica.
You can do it with the PXUIFieldAttribute.SetEnabled method.
Let's say you have DAC PRTran with column earningType and values of PRTran you get from PaySlipDetails view. Then you can block whole column with the following call:
PXUIFieldAttribute.SetEnabled<PRTran.earningType>(PaySlipDetails.Cache, null, isEnabled);
Another question which sometime appears is how to block single record value in column.
The solution is the following:
row = .... here goes your logic which will get PRTran for which you need to make blocking
PXUIFieldAttribute.SetEnabled<PRTran.earningType>(PaySlipDetails.Cache, row, false);
Ready to take your Acumatica customization to the next level? Whether you need to block specific columns, tailor record-level behaviors, or implement advanced logic, our team is here to help. Share your unique customization needs with us, and let’s build solutions that work seamlessly for your business. Leave a customization request today and unlock the full potential of Acumatica for your organization!
2 Comments
Vladislav said 2 years ago
Hello! But what if I have a CacheExtension and I want to manage availability of its field? I didn't find any way to do it, because SetEnabled (or SetReadonly) accepts only Cache type, but not CacheExtension. Sorry for possibly silly question, I am novice at Acumatica)
docotor said 2 years ago
I propose you to try PXUIFieldAttribute.SetEnabled<PRTranExt.UsrEarningType>(PaySlipDetails.Cache, row, false); I assume that Acumatica should itself try to find extension.