How do I invoke customized CreateOrderWizardForm

I’ve added some custom code to the CreateOrderWizardForm (displayed when you click on Create Sales Order… in the Actions->Quote menu). It works fine if I run in developer mode and select the customization when the form is opening, but the customization doesn’t run if I’m not in developer mode.

I thought I could use the normal sub-process menu entry for this but it doesn’t seem to conform to the usual structure. The “Process Calling” window doesn’t appear when I click on the “Create Sales Order…” menu entry. In menu maintenance, I can create a new non menu item, but I can’t find a “Program” entry that relates to the order wizard form so I can’t select the associated customization. I didn’t get that info since the “Process Calling” window doesn’t show. I’ve searched the Erp and Ice dlls and don’t find one that seems to correspond to the CreateOrderWizardForm.

So, what am I missing? How do I find the dll that corresponds to the wizard form that I customized?

Erp.UI.OrderJobWizEntry.dll

Thanks. I’ll give that a try. I saw it in the list (the only one with"Wiz" in the name) but the Job reference kind of threw me off. If I can ask, how do you know this is the right dll?

Tried using that dll but the customization doesn’t show up in the customization combobox.

I looked at the decomp of the OrderEntryForm. I looked up the menu item and saw this:

ButtonTool buttonTool70 = new ButtonTool("OrderJobWizardTool");

Here is what it does on click:

if (this.trans.Update())
						{
							ProcessCaller.LaunchForm(this, "Erp.UI.OrderJobWizEntry", new OrderJobWizArgs(num2.ToString(), "", "", false)
							{
								SuppressFormSearch = true,
								IsModal = false,
								ValueIn = num2.ToString()
							});
							this.wasCalledJobWizard = true;

Forgive me if I’m totally off base here, but the quote to order wizard is launched from the quote entry form. What menu item were you looking at?

I think I am the one off base here. I misread earlier and thought you were referencing the OrderEntry form. I’ll go back and have a look at the QuoteEntry form.

In the meantime, can you track it down in customization maintenance?

What do you want me to track down?

I was thinking maybe you could locate your customization (like perhaps you gave it a good description you can find). This would help you determine what assembly it’s applied to.

Here is the code from the QuoteEntry form. It appears to be the same DLL.

private void invokeCreateSalesOrder()
		{
			this.trans.ignoreUpdate = true;
			bool flag = this.trans.DefaultOrderFields();
			if (flag)
			{
				CreateOrderWizardForm createOrderWizardForm = new CreateOrderWizardForm(this.trans);
				if (createOrderWizardForm.ShowDialog() == DialogResult.Yes)
				{
					int newOrderNum = createOrderWizardForm.NewOrderNum;
					if (newOrderNum > 0)
					{
						ProcessCaller.LaunchForm(this, "Erp.UI.OrderJobWizEntry", new OrderJobWizArgs(newOrderNum.ToString(), "", "", false)
						{
							SuppressFormSearch = true,
							IsModal = false,
							ValueIn = newOrderNum.ToString()
						});
					}
					this.trans.RefreshEverything();
				}
				createOrderWizardForm.Dispose();
				this.trans.ClearOrderViewRowFilter();
			}
			this.trans.ignoreUpdate = false;
			try
			{
				this.trans.Undo();
			}
			catch
			{
			}
		}

Unsure it will work - but try making a menu item like this:
image

See if the customization shows.

Nope, still no customization. The only thing I see in customization maintenance is the form name which is App.QuoteEntry.CreateOrderWizardForm

Ah so it’s this guy

namespace Erp.UI.App.QuoteEntry
{
	public class CreateOrderWizardForm : EpiBaseForm
	{

I am under the impression that when a form has a “sub-form” and you customize the “sub-form”, the main form needs to have a customization of the same exact name as the “sub-form” customization. then you add the customization to the menu item for the main form and it “just works”

5 Likes

Nice to know! Thanks Bernie

Yes, I was beginning to remember something like that from long ago. So, if the main form already has a customization, I need to name the sub-form customization to the same thing?

Works perfectly. Thanks for the memory jog. I knew I had done something like that several years ago in a Vantage system, but I didn’t remember the trick.

Thanks for the help. Bernie’s info was the clincher. BTW, what tool are you using to decomp the code?

ILSpy is my personal favorite out of habit. DotPeek is another popular one

1 Like