Over the last several versions Epicor has added a lot more built in functionality in BPM’s and even added Functions. Now a days you can call other BO Method’s and pass along arguments and do a lot of things that a few years ago you HAD to write custom code to accomplish. Plus they’ve exposed more and more of the Business Objects and Services in the ERP and ICE namespaces.
But one thing I’ve always wanted to do and would really simplify things is to be able to use the ‘Open With’ context menu functionality. To be able to call a Method or Service for ‘OpenWith’ and pass the arguements/keys and open whichever form we need. I’ve seen a few posts on here asking how to open certain forms automatically when certain things happen like create an Order from a Quote or something. I’ve looked around and I’m hoping I’m just missing it, but ‘OpenWith’ really should be an ICE level Method or something, but I fear it’s actually an inaccessible Client Side function, but with the movement towards more and more Kinetic I would have thought this would have been exposed somehow.
Just looking to see if anyone else has any insights on how ‘Open With…’ works, both in Classic and Kinetic.
Thanks
You could always (many Epicor versions) use Context Menu Help to add menus to the ‘Open With…’ list.
It appears that it does need to be a menu item. In ERP10 you can put a URL Link on the menu. Not sure if you could use that to call an Epicor Rest method for the Function call.
Another option, put a UD Entry on the menu and call the function from a customization, then close the UD Entry. Not as clean as I would like but, might provide the requested functionality.
You want to make your own open with? Or are you looking to Open another screen and passa value in? If so you can just use ProcessCaller to invoke another form and passin the keys.
The classic is the just stored in Epicor\Client\Res\ContextMenu.xml
Hmm - Is it possible to enable open-with for the order number pop-up you get after converting a quote to an order? Or maybe in the Kinetic UI?
“Open With…” uses the Like extended property on the field in question. For example, let’s say you add a UD field on the OrderHed table, called OrigOrderNum_c, that contains the order number of the original that this order was duplicated from. If you add a Like extended property to your UD field containing “Erp.OrderHed.OrderNum”, then Epicor knows that this field points to the primary key for an order, and is able to suggest screens that can open orders. This only works with tables with a single primary key.
What Epicor does to open the screen, is to call the screen and pass it parameters using LaunchFormOptions:
Ice.Lib.Framework.LaunchFormOptions lfo = new Ice.Lib.Framework.LaunchFormOptions();
lfo.ValueIn = // Object, contains parameters for the screen, usually separated by a tilde ~
lfo.Sender = this;
lfo.IsModal = false;
ProcessCaller.LaunchForm(oTrans, "SOMEMENUID", lfo);
Of course, this only works client-side, there is no way to open a form from server code.