Epicor customization, Get ByID from another form

I have one customized form where I can create Sales Order and Quote. And it is working well.
Now the requirement is, if SO form or Quote form is already open. Whenever I create SO or quote from my customized form. The new SO number or Quote number should come as ID in the already form open.

Launch form will open always new form for me. But that is not required.

Any suggestions?

Is the secondary form Subscribed to the Primary form already, prior to creating a new record?
If so, it likely just needs a notification to be sent.
If not, then you should be able to launch the menu that was previously opened with an LFO…

Hi Jason,

Launch menu will always open a new form for me but that is not i am looking for.

What actually looking for is if there is already Sales order form open, i just want to pass ordernum from my customized form. In my customized form, i have a button where i am create new sales order.

Can you help me to let me know how the notification can be send to another form?

Just to be clear, if you have the Launch Menu on a button and click the button 10 times, you will get the screen to open 10 times? I would like to see the code you are using to cause this.

New customized form is it designed using UD form ?
If yes, then you can try linking the key fields in the extended properties to the required table.

If you have used UD103.
If the UD103.Key1 is the Sales order number
In the extended properties of the UD103, for the field Key1

Like = OrderHed
Like field = Ordernum

Hi Jason,

Sorry i misunderstood your point. Actually i am already using launch forms which works exactly you said.

But the situation is if SO is already open and it is not subscribed from my form. In that case i want to load the SO number created with my button click on the non subscribed form.

Hi Prash,

The thing is I am not storing any ordernumber. Actually the form is dashboard and i have added 2 buttons to create SO and quote.

That may not be directly possible. The only thing I can guess would be to ensure you are launching the same menu.

There is a lightly used feature of the UI Framework where a Form can launch another Form with an Option for the Called Form to “Call Back” into the Calling Form. There are several Auto Configured callbacks for some standard events - Save, Form Exit, Delete, etc. - and you can also hook up your own custom callback.

The Attached Customization pair was demonstrated / discussed at the Epicor Insights Client Customization session in 2019. The Customization on the Ship Via Form calls the UD01 Form and passes a Callback Token. Passing the token causes the Called Form (UD01) to send Callbacks to the Calling Form (Ship Via) for standard Events. The Customization also shows how to pass a Callback Delegate so that your custom code in UD01 can invoke custom code in the Ship Via form.

Epicor Insights is a great event for networking, learning about the latest product updates, product roadmap, and for getting information on all sorts of fancy tech features like customization Callbacks…

Epicor_Insights_CallBack.zip (6.7 KB)

1 Like

This is code, I am going through. We have reach to the already open SO form but the problem now is how to add pass new order number created.

bool formopen = false;
foreach (Form frm in Application.OpenForms)
if(frm.Name.ToString() == “SalesOrderForm”)
formopen = true;
MessageBox.Show("control: " + frm.Controls.ToString()) ;
//The Order Number field possibly needs to be accessed here nas value set to OrderNum variable

		if(formopen == false)
			LaunchFormOptions lfo = new LaunchFormOptions();
			lfo.ContextValue =  OrderNum;
			//Then, call your form by MenuID that you are passing the data into
			lfo.IsModal = false;
			ProcessCaller.LaunchForm(oTrans, "OMMT3001", lfo);