Solved

Activate specific button even in closed invoice

  • 21 February 2022
  • 2 replies
  • 154 views

Userlevel 2

Hello Guys,

it’s possible to enable a specific button even in closed invoice?

 

 

icon

Best answer by Dmitrii Naumov 21 February 2022, 16:26

View original

2 replies

Userlevel 7
Badge +5

It is possible. 

There are several ways to do this. 

  1. Use workflows. See https://help-2021r2.acumatica.com/(W(2))/Help?ScreenId=ShowWiki&pageid=cbbac950-4172-42c7-b950-a589a87df249
  2. Use something like 
                [ActionName].SetEnabled(true); in RowSelected event
  3. Set access rights in the code
    [PXUIField(DisplayName = “COPIER MARGE”, MapEnableRights = PXCacheRights.Select, MapViewRights = PXCacheRights.Select)]
Userlevel 4
Badge +1

hi @SadokHanini  

In continuation to @Dmitrii Naumov  suggestion, to brief more below is the example  for button to get enabled in sales order, you can try similar way on your screen 

 

syntax 

  protected virtual void DACName_RowSelected(PXCache cache, PXRowSelectedEventArgs e, PXRowSelected baseEvent)

{

   condition and logic 

}

note: here Base Event parameter is required  only when we customized the existing screen for new screen customization this parameter is not required 

 

Example 

  protected virtual void SOOrder_RowSelected(PXCache cache, PXRowSelectedEventArgs e, PXRowSelected baseEvent)
        {

            if (baseEvent != null)
                baseEvent(cache, e);
            SOOrder row = (SOOrder)e.Row;
            if (row == null) return;

             KNCPAlternateItems.SetEnabled(row.Status == "Completed");

 

}

 

Reply


About Acumatica ERP system
Acumatica Cloud ERP provides the best business management solution for transforming your company to thrive in the new digital economy. Built on a future-proof platform with open architecture for rapid integrations, scalability, and ease of use, Acumatica delivers unparalleled value to small and midmarket organizations. Connected Business. Delivered.
© 2008 — 2024  Acumatica, Inc. All rights reserved