Solved

Add custom field with link to document

  • 27 November 2020
  • 1 reply
  • 896 views

Userlevel 2

Hello 

I wanna add a custom field in invoice line (APTran) 
this custiom field will contain a number of shipment 
and i want it to be linked to the shipment .

 

Thanks :)  

icon

Best answer by Naveen Boga 27 November 2020, 19:00

View original

1 reply

Userlevel 7
Badge +17

Hi @SadokHanini ,

To have a link field for the customization column in the APTran grid. Please refer the below sample action code. 


Extension Graph

public PXAction<ReRunSOSSaaSFilter> ViewSalesOrder;
        [PXUIField(DisplayName = "Sales Orders", MapEnableRights = PXCacheRights.Select, MapViewRights = PXCacheRights.Select, Enabled = true, Visible = false)]
        [PXButton(OnClosingPopup = PXSpecialButtonType.Refresh)]
        public virtual IEnumerable viewSalesOrder(PXAdapter adapter)
        {
            if (RunAddressyView.Current != null)
            {
                SOOrderEntry graph = PXGraph.CreateInstance<SOOrderEntry>();
                SOOrder objSOOrder = PXSelect<SOOrder, Where<SOOrder.orderNbr, Equal<Required<SOOrder.orderNbr>>>>.Select(graph, RunAddressyView.Current.OrderNbr);
                graph.Document.Current = objSOOrder;
                PXRedirectHelper.TryRedirect(graph, PXRedirectHelper.WindowMode.NewWindow);
            }
            return adapter.Get();
        } 

.aspx page

<px:PXGridColumn DataField="usrSOOrderNbr" LinkCommand="ViewSalesOrder" />

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