Gary P
Active Member
All, I'm trying to have a form, called by the Find button on P4021 trigger a new find and call to the form, and want to find a way to do it without using recursion. Here's the long of it:
I'm making a modification to P4021 - Supply and demand that will group records together to show a summary. The way I'm doing it, on the "Post Button Clicked" event of the Find button, I generate a workfile, and then call the new form that displays this information.
I need to be able to handle this form in three different ways:
On-demand: The user has already performed a successful find, and has used a form exit to call this summary.
Auto-call: If a processing option is set, when the user presses Find, the summary form is automatically called (the user doesn't see the main form).
Interconnect Auto-call: Same as above, but this handles going to P4021 from another application, so it populates item/branch etc, presses Find, and then calls the summary.
As stated above, I've been able to accomplish this by creating a form exit that generates the workfile and calls the summary, then handles the auto-call via ER in the Find button's "Post Button Clicked" event. Now the user wants to change the part number / branch and initiate a new P4021 Find from the summary. I'm concerned about this causing a recursive problem, because the Find button which called the summary in the first place would then be initiating a new find. I admit I'm not too familiar with the JDE ER to know any tricks. If there was a way to give a command on a button, but delay that command until after the event has stopped, that would handle my issue.
My first thought is to move a "Controller" button. I would move the summary auto-calls to the controller from the Find, and then the Find would be complete before a summary call. This would be mildly invasive, as I would need would need to make all calls to Find call the controller first. This would be a performance hit when the user wants to call the form on-demand. But, other than that, I'm stumped.
Does anyone know a better way?
I'm making a modification to P4021 - Supply and demand that will group records together to show a summary. The way I'm doing it, on the "Post Button Clicked" event of the Find button, I generate a workfile, and then call the new form that displays this information.
I need to be able to handle this form in three different ways:
On-demand: The user has already performed a successful find, and has used a form exit to call this summary.
Auto-call: If a processing option is set, when the user presses Find, the summary form is automatically called (the user doesn't see the main form).
Interconnect Auto-call: Same as above, but this handles going to P4021 from another application, so it populates item/branch etc, presses Find, and then calls the summary.
As stated above, I've been able to accomplish this by creating a form exit that generates the workfile and calls the summary, then handles the auto-call via ER in the Find button's "Post Button Clicked" event. Now the user wants to change the part number / branch and initiate a new P4021 Find from the summary. I'm concerned about this causing a recursive problem, because the Find button which called the summary in the first place would then be initiating a new find. I admit I'm not too familiar with the JDE ER to know any tricks. If there was a way to give a command on a button, but delay that command until after the event has stopped, that would handle my issue.
My first thought is to move a "Controller" button. I would move the summary auto-calls to the controller from the Find, and then the Find would be complete before a summary call. This would be mildly invasive, as I would need would need to make all calls to Find call the controller first. This would be a performance hit when the user wants to call the form on-demand. But, other than that, I'm stumped.
Does anyone know a better way?