Loading ...

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);

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.

Be the first to rate this post

  • Currently 0.0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5