Solved

Release button method is called inside Process All method from Release Payments tab

  • 31 January 2022
  • 5 replies
  • 205 views

Userlevel 4
Badge +2

Hi,

I have two methods that extend functionality of 2 UI elements

1)Release from Check and Payments tab

  1. Process from Release Payments tab 

    Unfortunately, when I press process from Release Payments tab, it calls persist methods which is responsible for Release button in Checks and Payments and executes it’s logic, that I have wrote. I tried to omit this by using static class , checking if the flag was set to true in class which responsible for Release Payment tab, but it’s not working as I expected due to method is called arbitrary

 

How to prevent calling of Persist method of Release button when  Processed button is pressed ?

icon

Best answer by deebhane 31 January 2022, 18:08

View original

5 replies

Userlevel 4
Badge +1

Hi @Ivan ,

The framework of all the processing screen will invoke the respective record screen, will trigger persist and then the respective action.

In your example from the release payment processing , it is intended to navigate to  “check and payment” persist and then perform the release action.

May I know why do you want to avoid invoking persist.

Userlevel 4
Badge +2

Hi @Ivan ,

The framework of all the processing screen will  invoke the respective record screen and will trigger  persist and then the respective action.

In your example from the release payment processing , it is intended to navigate to  “check and payment” persist and then perform the release action.

May I know why do you want to avoid invoking persist.

Hi @deebhane 

I need to ignore it, because it has logic that need to be executed when user presses Release at Checks and Application tab, not when pressing PROCESSING at Release Payments tab, because in this case another logic must be done 

Userlevel 4
Badge +1

hi @Ivan ,

if you have specific  requirement to have different logic  to be executed when  release is performed at screen level and from processing screen, then you can go with Screen ID condition in the persist method to find from where the  operation is invoked. 

example 

  if (Base.Accessinfo.ScreenID.Replace(".", "") == "AP302000")
 {

   del.Invoke();

 }

else  if (Base.Accessinfo.ScreenID.Replace(".", "") == "AP505200")
 {

    del.Invoke();

 }

else 

{

    del.Invoke();  // invoked from any other screen.

}

Userlevel 4
Badge +2

@deebhane  I am much obliged for your assistance, you helped me a lot  

Thank you 

Userlevel 4
Badge +1

@deebhane  I am much obliged for your assistance, you helped me a lot  

Thank you 

Great to hear @Ivan . The solution worked. 

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