Launch customized form code

Hello.
I’m working on customization where I prepared customized Customer form and Case Entry form.
In the Case Entry I have button that should launch customized Customer form. Is it any other way to do it than adding new menu item for customized Customer?

if you disable the new created Customer menu item (with this Customer customized form), then the only access to it will be your button on the Case Entry form

Thanks for solution but that was not what I’m looking for. I would like to avoid creating mess. Of course sometimes it’s needed because there is no straight way but at first I need to make sure.

Here’s how you can do it from within customization code for CRMCallEntry (because that’s what I have to hand).

Erp.UI.App.CRMCallEntry.CRMCallArgs callargs = new Erp.UI.App.CRMCallEntry.CRMCallArgs(
					strRelatedToFile,
					strKey1,
					strKey2,
					strKey3,
					strCallSeqNum,
					strCustID
					);
ProcessCaller.LaunchCallbackForm(oTrans, menuID, callargs);

You’ll need the reference to the right UI form dll and to assemble the right CallArgs object for the form you want. “menuID” is whichever menu ID you already have working elsewhere.

You can always create a New Menu ID under Processes section of the tree in Menu Maintenance, so it won’t show up on Menu selection, but then you can call it via code.

Is there a way to call it without adding it, I am sure one could debug what Epicor calls when you enter Customization Mode and select a layer. I believe its possible, I just haven’t taken the time to debug it, because I always use the Menu Maintenance instead, because layer names change and relying on a special layer name is more fragile than adding a Menu Item under Processes section in Menu Maintenance – Plus then you can re-purpose the same Menu ID everywhere easily, without hardcoding layer names.

image

Custom Processes

I even see a Custom Processes folder, even better - you can add them to that.
image

2 Likes

Thanks for your commitment Daryl!
Unfortunately I getting error playing around different variations of method names.

Erp.UI.App.CustomerEntry.CustomerEntryArgs
The type or namespace name ‘CustomerEntryArgs’ does not exist in the namespace ‘Erp.UI.App.CustomerEntry’ (are you missing an assembly reference?)

Do you have access to any documentation of it or more complex Object Browser than Epicor provided?

I’m afraid I don’t.

I use trial and error, trace logs and, when desperate, a decompiler (which isn’t usually as helpful as you’d think it should be). In this case the best option is probably to turn on trace logging, right-click “open with” to the Customer Entry screen, and see what’s in the trace.

1 Like

Usually that means you have to Reference the CustomerEntry Assembly, in the Customization Tools Dialog under Tools → Assembly Reference Manager

image

CustomerEntryArgs inherits LaunchFormOptions and is defined actually in the Adapter Erp.Adapters.Customer.dll
https://www.epiusers.help/search?q=launchformoptions

You could even reference it all much easier by using the Wizard:
image
image

2 Likes

Hello.
Thank you everyone for help!
Going through new menu item seems to be the best option for me. I will get some more control on it after when I will apply customization in new environment.