Skip to main content
Solved

How to get custom field value from Payment and Application screen to Bank Deposit screen document level

  • October 8, 2021
  • 1 reply
  • 221 views

Hi Everyone ,

We have  below requirement , can anyone suggest best possible way to achieve it please?

  • Added a new field in Payment and Application header level

     

  • Should display the above custom field value in Bank Deposit Document level grid


    Thanks in advance.

Best answer by Naveen Boga

Hi @lakshmim85,

You can have logic at persist delegate() at cache inserted block to fetch custom field and assign it to Grid field. Please find the sample code below for your reference.

 public class CADepositEntryExtension : PXGraphExtension<CADepositEntry>
{
  public delegate void PersistDelegate();
        [PXOverride]
        public void Persist(Action del)
        {
			 if (Base.Document.Cache.GetStatus((object)Base.Document.Current) == PXEntryStatus.Inserted)
            {

			  foreach(var paymentrecord in Base.DepositPayments.Select())
			  {
			    // Write a logic to fetch the custom field value based on the Payment Type and Reference Nbr and assign it to grid field.			     

			  }

			}
		del();
		}
}

 

View original
Did this topic help you find an answer to your question?

1 reply

Naveen Boga
Captain II
Forum|alt.badge.img+19
  • Captain II
  • 3411 replies
  • Answer
  • October 8, 2021

Hi @lakshmim85,

You can have logic at persist delegate() at cache inserted block to fetch custom field and assign it to Grid field. Please find the sample code below for your reference.

 public class CADepositEntryExtension : PXGraphExtension<CADepositEntry>
{
  public delegate void PersistDelegate();
        [PXOverride]
        public void Persist(Action del)
        {
			 if (Base.Document.Cache.GetStatus((object)Base.Document.Current) == PXEntryStatus.Inserted)
            {

			  foreach(var paymentrecord in Base.DepositPayments.Select())
			  {
			    // Write a logic to fetch the custom field value based on the Payment Type and Reference Nbr and assign it to grid field.			     

			  }

			}
		del();
		}
}

 


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings