Solved

Copy field from SO to Invoices

  • 10 March 2023
  • 6 replies
  • 235 views

Userlevel 3
Badge

Hi every one,

I have a custom field on Sale orders named “So Notes” (usrSoNotes), I want copy it to Invoices (image).

I try code below, but still have data. 

public class ARRegisterExt : PXCacheExtension<PX.Objects.AR.ARRegister>
    {
        #region UsrSoNotes
        [PXDBString(800, IsUnicode = true)]
        [PXUIField(DisplayName = "So Notes")]
        [PXDefault(typeof(Search<SOOrderExt.usrSoNotes, Where<SOInvoice.refNbr, Equal<Current<ARRegister.refNbr>>,
             And<SOOrder.orderNbr, Equal<Current<SOInvoice.sOOrderNbr>>>>>), PersistingCheck = PXPersistingCheck.Nothing)]
        public virtual string UsrSoNotes { get; set; }
        public abstract class usrSoNotes : PX.Data.BQL.BqlString.Field<usrSoNotes> { }


  
        #endregion
    }

Thank for your help.

icon

Best answer by Kandy Beatty 13 March 2023, 09:48

View original

6 replies

Userlevel 7
Badge +2
Order Type Setting supports Copying Notes and Attachments to Shipments/Invoices

Hi @thanhaim , you don’t need to do a customization to copy notes/attachments from a Sales Order to Shipment or Invoice.  There are settings in the Order Types that provide you with this capability.

Userlevel 3
Badge

@Dana Moffat, I just visited Order Type in the picture above you provided, I not found position setting for my custom field on Sale orders named “So Notes” (usrSoNotes)(custom field is require). Can you guide me further? Thankyou

Userlevel 7
Badge +16

@Dana Moffat, I just visited Order Type in the picture above you provided, I not found position setting for my custom field on Sale orders named “So Notes” (usrSoNotes)(custom field is require). Can you guide me further? Thankyou

Hi @thanhaim 

You will not get that option on the Order Types since it is a customization. It would need to be added to a customization package. 

Userlevel 3
Badge

@kandybeatty49 I do a customization this success. Thank for you helped me know the copy setting function.

Userlevel 7
Badge +2

@thanhaim instead of using a custom field, could you use the Notes generic functionality and leverage the settings in Order Type? 

The Order Type settings can provide the ability to copy the line notes from the sales order to the invoice and/or shipment automatically.

 

 

And in 22R2, you now have the capability to Copy Sales Order header notes to the shipment and/or invoice.

 

 

Userlevel 3
Badge

@Dana Moffat Thank you for sharing.

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