Solved

how to transfer signatory in Request for Payment form

  • 19 January 2023
  • 2 replies
  • 33 views

Userlevel 3
Badge

somebody can you help me? what is the process for transferring of signatory thank you

icon

Best answer by Yuriy Zaletskyy 22 January 2023, 09:05

View original

2 replies

Userlevel 5
Badge +3

In Acumatica, you can transfer a signatory to the Request for Payment form via C# by using the following steps:

  1. Create a custom field on the APPaymentRequest form to hold the signatory information.
  2. Create a custom button on the APPaymentRequest form that, when clicked, opens a new form or pop-up window where the user can select the signatory.
  3. Create a C# event handler for the custom button's click event that retrieves the selected signatory information and assigns it to the custom field on the APPaymentRequest form.
  4. Make sure the custom field is included in the layout of the APPaymentRequest form and is visible to the user.

Here is an example of C# code that shows how to create a custom button, event handler and custom field on the APPaymentRequest form, and assign the selected signatory to the custom field:

using PX.Data;
using PX.Objects.AP;

namespace AcuPowerOrYourNameSpace
{
public class APPaymentRequest_Extension : PXGraphExtension<APPaymentRequest>
{
//Custom field to hold the signatory information
public abstract class usrSignatory : IBqlField { }
[PXString(250, IsUnicode = true)]
[PXUIField(DisplayName = "Signatory")]
public string UsrSignatory { get; set; }

//Custom button to open the signatory selection form
public PXAction<APPaymentRequest> selectSignatory;
[PXButton(CommitChanges = true)]
[PXUIField(DisplayName = "Select Signatory")]
protected void SelectSignatory()
{
//Open the signatory selection form or pop-up window
}

//Event handler for the custom button's click event
protected void APPaymentRequest_RowSelected(PXCache cache, PXRowSelectedEventArgs e)
{
if (e.Row == null) return;
APPaymentRequest row = (APPaymentRequest)e.Row;
APPaymentRequest_Extension ext = cache.GetExtension<APPaymentRequest_Extension>(row);

//Retrieve the selected signatory information
ext.UsrSignatory = //Retrieve the selected signatory information here;
}
}
}

It is important to keep in mind that the above code is an example and may require modification to match your specific requirements. Additionally, you will have to create the form or pop-up window where the user can select the signatory.

Userlevel 3
Badge

thank you so much

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