Skip to main content
Answer

Copy field from SO to Invoices

  • March 10, 2023
  • 6 replies
  • 308 views

Forum|alt.badge.img

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.

Best answer by Kandy Beatty

@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. 

6 replies

Dana Moffat
Community Manager
Forum|alt.badge.img+2
  • Community Manager
  • March 10, 2023
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.


Forum|alt.badge.img
  • Author
  • Freshman II
  • March 11, 2023

@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


Kandy Beatty
Captain II
Forum|alt.badge.img+17
  • Captain II
  • Answer
  • March 13, 2023

@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. 


Forum|alt.badge.img
  • Author
  • Freshman II
  • March 13, 2023

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


Dana Moffat
Community Manager
Forum|alt.badge.img+2
  • Community Manager
  • March 13, 2023

@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.

 

 


Forum|alt.badge.img
  • Author
  • Freshman II
  • March 16, 2023

@Dana Moffat Thank you for sharing.