Loading ...

How To Enable Some Control In Acumatica

Hello everybody,

today I want to leave a short note for the following situation:

Imagine that you need to enable some control in Acumatica ( for example Mark for PO ) on page Sales orders ( SO301000 ).

As usually for enabling control there are two ways:

  1. RowSelected
  2. Automation steps.

Recently I found third option, when neither 1 nor 2 did work. After spending some time I found third option: Cache has property AllowUpdate. After I've set it to true, I was able to modify lines in Document details. 

In your code it may look like this:

protected void SOLine_RowSelected(PXCache cache, PXRowSelectedEventArgs e, PXRowSelected del)
{
        if (del != null)
              del(cache, e);
        SOLine row = (SOLine)e.Row;
        if (row == nullreturn;
        Base.Transactions.Cache.AllowUpdate = true;
        PXUIFieldAttribute.SetEnabled<SOLine.pOCreate>(cache, row, true);
        PXUIFieldAttribute.SetEnabled<SOLine.shipDate>(cache, row, true);
}

you still may need Row_Selected event handler, but not forget to add AllowUpdate = true.

If you're facing challenges customizing your Acumatica instance or need additional development tailored to your business needs, we're here to help! Our team specializes in Acumatica customizations, and we can assist with anything from enabling controls to building complex workflows. Don’t hesitate to leave a customization request below—let's work together to optimize your system and boost your business efficiency!