We’re in the middle of migrating a customer from 10.2.700 on-premise to the cloud (currently Kinetic 2022.1.1). In the Epicor product configurator we used to be able to create a dynamic url based on some inputs and open it via System.Diagnostics.Process.Start. In their new cloud environment however, I cannot use System.Diagnostics anymore.
We’re still using the Classic UI (WinForms) product configurator. When i validate the code it will always give the following exception, either in OnFieldChange or Client-side UD methods.
Is there any workaround for this so we will still be able to open a specific url in the browser? I’ve already tried the default Browser control provided in the Product configurator, but this seems to use an integraded Internet Explorer browser which throws a lot of Script Errors…
I do have System.Diagnostics as a using, and if I comment it out it fails, so I guess my use of Process.Start is still relying on that.
My knee-jerk reaction is that everything needs to be pulled back from the UI going forward - so when we get to this point I’ll probably be moving this into a function and putting the using statement and the action in there, and just calling it from my UI.
Assuming functions don’t lose the ability to get references to whatever, I imagine that’ll be the generic solution for pretty much everything.
Actually in any case, the one I did is running on the server, because we don’t use clients on local machines - we’re using Remote Desktop Services. We don’t even have a pdf reader on the local machine, it opens the default pdf reader on the server and passes it back to the local machine in a RDS window.
Hideous hackish way to do this… You should be able to use System.Diagnostics.Process.Start in a customization. You can use Process caller in a configurator (for now…). Make a customization that simply opens a URL and closes itself. You can pass the URL via LaunchFormOptions I believe. Its gross, but I think it could work in a pinch. I think you should be able to hide the form during one of the startup events, but it might flash for a bit.
Edit: actually depending on what you want the URL to do, you might be able to open it directly with CEF in the customization.
Hey, this might be completely off the wall, but just reading @aidacra on New UI calling. He mentions in point 1 and 2 here:
that you have a url field on menu items. If a (custom UD) menu could point at a url, could you just use launchformoptions to launch that menu and let Kinetic figure out how to open the url?