Carry record note from Weekly Crew Time Entry to Employee time card

  • 5 October 2023
  • 2 replies

Userlevel 1

Hi Community,

How can I make the records notes entered from the “Weekly crew time entry” be updated to the “Employee's time card” when they are created?



Best answer by praveenpo 5 October 2023, 06:32

View original

2 replies

Userlevel 6
Badge +3

hi @SulayVargas51 ,

We had similar kind of implementation where we are copying soline notes to shipment line.
you can refer the below sample code and implement in your graph.

public delegate void CreateShipmentDelegate(CreateShipmentArgs args);
        public virtual void CreateShipment(CreateShipmentArgs args, CreateShipmentDelegate baseMethod)
            SOOrder orderData = args.Order;
            if (orderData != null)
                SOOrderEntry soGraph = PXGraph.CreateInstance<SOOrderEntry>();


                foreach (SOShipLine line in Base.Transactions.Select())
                    SOLine objLine = PXSelect<SOLine, Where<SOLine.orderNbr, Equal<Required<SOLine.orderNbr>>,
                                                  And<SOLine.orderType, Equal<Required<SOLine.orderType>>,
                                                  And<SOLine.inventoryID, Equal<Required<SOLine.inventoryID>>,
                                                  And<SOLine.lineNbr, Equal<Required<SOLine.lineNbr>>>>>>>
                                                 .Select(Base, line.OrigOrderNbr, line.OrigOrderType, line.InventoryID, line.LineNbr);
                    if (objLine != null)
                        soGraph.Transactions.Current = objLine;
                        PXNoteAttribute.SetNote(Base.Transactions.Cache, line, PXNoteAttribute.GetNote(soGraph.Transactions.Cache, soGraph.Transactions.Current));

Hope this is Helpful.

Userlevel 1

Thanks very much !!


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