Skip to main content
Question

Customize Payment and Application Screen

  • September 26, 2023
  • 2 replies
  • 70 views

Forum|alt.badge.img

When release payment and application , i want to a field from document apply to field customer ref in application history. Could you guide me how to do it ?

 

2 replies

Naveen Boga
Captain II
Forum|alt.badge.img+19
  • Captain II
  • September 26, 2023

@kevinheng21  Here is the sample example to override the RELEASE action for the Payments.

 

Hope this helps !! 

https://stackoverflow.com/questions/74879631/how-can-i-override-the-releasepayments-process-process-all-method


Forum|alt.badge.img
  • Author
  • Jr Varsity II
  • September 28, 2023

I try with this but it cannot solve

  #region ReleaseDocProc
  public delegate List<ARRegister> ReleaseDocProcDelegate(JournalEntry je, ARRegister ardoc, List<Batch> pmBatchList, ARDocumentRelease.ARMassProcessReleaseTransactionScopeDelegate onreleasecomplete);

  [PXOverride]
  public List<ARRegister> ReleaseDocProc(JournalEntry je, ARRegister ardoc, List<Batch> pmBatchList, ARDocumentRelease.ARMassProcessReleaseTransactionScopeDelegate onreleasecomplete, ReleaseDocProcDelegate del)
  {
      onreleasecomplete += OnReleaseComplete;
      return del(je, ardoc, pmBatchList, onreleasecomplete);
  }

  private void OnReleaseComplete(ARRegister ardoc)
  {
      ARRegisterExt41 aRRegisterExt41 = PXCache<ARRegister>.GetExtension<ARRegisterExt41>(ardoc);
      ARTranPost aRTranPost = SelectFrom<ARTranPost>.Where<ARTranPost.refNbr.IsEqual<@P.AsString>>.View.Select(this.Base, ardoc.RefNbr);
      PXCache<ARTranPost>.GetExtension<ARTranPostExt>(aRTranPost).UsrCustomerRef = aRRegisterExt41.UsrInvoiceExtRefNbr;
      Base.Actions.PressSave();
  }
  #endregion