Skip to main content

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

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