Deep Linking: how to make url's independent of dev/pilot/Prod database etc

I have added buttons to a cross company dashboard enabling me to jump to a case in another company. Works OK, would rather construct the url string and display one of my columns as a hyperlink that used the url than have them select a row then click a button… but nevermind.

eg url jumping to case entry for case number 2240 looks something like:

https://<servername>/<environment>/apps/erp/home/#/view/CRGO6200/Erp.UI.HelpDeskEntry?channelid=0&layerNames=CW_CASE_ENTRY2&company=KUSA&site=MfgSys&pageId=Details&pageChanged=true&KeyFields.HDCaseNum=22240

(see also the general thread here: Working in Browser? Really? - #50 by askulte)

My question: Can I get the servername and especially the environment from application studio? I’m developing this in pilot, but when it gets moved to production or back to test, I don’t want to forget to change all my urls, and have users accidentally jumping between different environments. Yikes.

I’ve looked at the constants dataview; can’t find anything there.

I guess I could set this up in a UD table per environment; or is there any other way to set up “environment-global” variables I’ll be able to evaluate using {dataview.column} syntax?

I think I have also seen ?[plant] somewhere to get the current site, maybe something like that would work?

1 Like

%session.context.appServer%

Determining the Current Session ID in Kinetic Customization - Kinetic 202X - Epicor User Help Forum (epiusers.help)

2 Likes

Perfect, thanks again Hannah. Are there more of these %xxx% variables/constants available? Any pointers to where they might be listed?

My customisation is now storing this in transView.urlBase in my “after form onload” event:

See the link in my previous post. That has a list.

doh! thanks.

Found something interesting re url-open, if my url parameter is a literal, ie url-open Parameters, Url: http://whatever, that’s what it opens.

If the url does not begin with http:// or https:// then under the hood it seems to prepend https://myserver/myenv/apps/erp/home/.

eg
url-open Parameters, Url: MickeyDuck
opens https://myserver/myenv/apps/erp/home/MickeyDuck

It seems to do the http check before evaluating anything, so
if I use a TransView variable and evaluate it (and I was using the sessionifno to build it including the Base url), ie url-open Parameters, Url: {TransView.OpenCaseUrl}, I get

ie my TransView.OpenCaseUrl was set via sessininfo to
https://myserver/myenv/apps/erp/home/whereiwanttogo

resulting in it url-open trying to load (!)

https://myserver/myenv/apps/erp/home/https://myserver/myenv/apps/erp/home/whereiwanttogo

So in the end I didn’t need the session info after all as the auto-prepend took care of it for me.

2 Likes