Open Browser w/ Custom URL (Kinetic) - help/guidance for non-programmer

I have a customized Dashboard which displays key Part information all in one place (Part information, Revision info, cross reference information, BOM information, part availability, etc.). This was custom built to mimic a legacy dashboard we had prior to going live with Epicor (back in February of this year, so we’re still somewhat “green”).

I have been asked if it is possible to add a button, which, when clicked would open a web-browser with a customized url which includes passed parameters from the dashboard (such as DrawingNum) which is already included in a BAQ/Dataview in the dashboard.

The end goal is to use a browser as a “portal” to open our in-house document management system and pass parameters…

In theory: we click the button, it opens a browser with a URL like… ProgramName://VaultID=guid,DocumentID=DrawingNum
This would then open up our custom software on my PC, and pass the parameters which would open up the drawing for viewing.

We are a cloud customer, we attempted to use ECM, but it has been a struggle… Long-story-short, we just don’t have the resources (personnel/time) to dedicate to get it functioning the way we want it. We have a current document management system which works extremely well for us, which we would love to keep using. We thought we HAD to go to ECM when we took on Epicor/Kinetic/SaaS… but we now think we may be able to us our existing system… IF I can get the above to work.

The catch… I’m not a programmer. I didn’t even stay at Holiday Inn Express last night. I’m an engineer, turned manager, turned Epicor Admin. I’ve done some light customizations, but do not have experience (yet) with REST, API, etc. So, I could use a little help, if you’d be so willing, to provide an outline or a little guidance. I’ll do the research and put together the pieces… if you can point me in the right direction. I’m just not sure where to start.

I’m assuming I need a Function & API key, I can create a button via App Studio… on-click event which kicks off the function, etc. I don’t need anything in Epicor to refresh or update, etc… I just need to open a browser with a customized url. What I WILL struggle with is the C# coding to get the data from the dashboard’s dataviews to pass to the generated url. So any examples of coding would also be immensely appreciated.

I think you can probably get by with just generating the links in your BAQ, and having a link column.

Would that be acceptable?

1 Like

Yeah, I think Kevin has it here. Just whip up a BAQ calculated field, ie:

'protocol://sitename.com/' + Part.PartNum + '/'

and it should spit out the link text.

protocol://sitename.com/0000test/

Then in your customized dashboard, or customized form, input a button with the code:

Process.Start ("http://google.com/");

Replace the google website with your calculated field from the BAQ, and you are in business!
Good luck!

I see you’re gonna need a little more to get this running. Once you create a dashbaord with your BAQ populating a grid, then you will create an event on that grid. I use the AfterRowChange event. The idea is that you have to choose a row from your BAQ to pass the calculated hyperlink to the underlying form. In my case, the bAQ is pulling values from my UD09 table, and plopping them into text boxes on my form.

	private void V_UD_OpenJobInventory_1View_AfterRowChange(EpiRowChangedArgs args)
	{
		MyPartNum.Text=args.CurrentView.dataView[args.CurrentRow]["UD09_Key1"].ToString();
		epiJobs.Value=args.CurrentView.dataView[args.CurrentRow]["UD09_Key4"].ToString();
		MyQty.Value=args.CurrentView.dataView[args.CurrentRow]["UD09_Number01"];
		epiStatus.Value=args.CurrentView.dataView[args.CurrentRow]["UD09_Key3"].ToString();
	}

You could do it the same way and save your hyperlink in a hidden field before you pass it out to the button code. For example, if your grid is calledV_CustomURLCalc_1View, your BAQ calc field is Calculated_MyHyperlink, and your hidden text box is MyHyperlinkText. When you click on the value in the grid it saves the hyperlink to the temp hidden field.:

	private void V_UD_OpenJobInventory_1View_AfterRowChange(EpiRowChangedArgs args)
	{
		MyHyperlink.Text=args.CurrentView.dataView[args.CurrentRow]["Calculated_MyHyperlink"].ToString();
}

Then in your button code, something like:

Process.Start (MyHyperlinkText.Text);

Of course you might want some error handling in there for your blanks and bad values. This should get you started! It certainly is not the BEST way, but it should work!

Good job Nate, but if I’m understanding correctly, he wants this in the browser.

No one WANTS to work in the browser… :stuck_out_tongue:

1 Like

URL/XSLT is built into dashboards, so you should not need any coding. Lookup XSLT in Epicor help. The help is a little dated showing IE, but hopefully that actually means default browser.

Unfortunately it does not. Classic client is hardcoded to use the WebBrowser control,
which is IE.

Slip GIF by The Roku Channel

1 Like

Well that is a bummer. I would have sworn I had a dashboard that had embedded links that did not require coding, but since I have done hundreds of them over the last decade I can’t find it.

Are you doing the dashboard in Kinetic or Classic?

Classic - in the Dashboard designer click new - URL Link and add the calculated field.
See attached sample
In Kinetic - who knows (which is probably why you are asking…

JobAttachments.dbd (134.3 KB)

Hi All,

Apologies, I was out yesterday with a sick kid.

@klincecum I am (currently) attempting to pull this off without a function and just using the URL-Open control in app studio and can get it to open a browser and populate the URL I need, except, I’m not sure how to call out the current UserID.

Something like this:
MyApp://userID={session.UserID},vaultID=XYZ123,documentID={PartRevBOMView.Calculated_Drawing}

Using {dataview.column} provides the correct drawing number for what I’m trying to do… but how do I pass the current user’s UserID?

1 Like

You could get that in the BAQ as well, if you don’t want to screw with App Studio.

Oooo… I found it (thank you debugging tools)…

{Constant.CurrentUserID}

image

I hate to pester you guys again, but I’m hung up on something “simple”.

I’m just trying to do a simple Grid > On Click trigger. This works if my grid is populated by a Dataview in my customization (BAQ Dataview).

However, if I have another grid populated by a BAQ, but is not a Dataview… it is just a grid with a Provider Model that calls a BAQ… the trigger won’t seem to work. I click the “link” in my grid and nothing happens.

I’ve been doing a lot of trial & error and can’t get it to fire. It may just be as simple as that I need to create Dataviews in order to use trigger events.

Left-hand BAQ Dataview (with EP Binding on grid model)… this works.

Right-hand is Grid (with Provider Model which calls a BAQ)… this doesn’t work.

I hate to use Epicor lingo… but is this “working as designed” and I need to create a Dataview for any BAQ I want to use as an on-click trigger? Is this a bug and it SHOULD work? Or is it possible… but I need to tweak something?

I tried to test, but I can’t get it to fire either. Didn’t have time to test your working one yet.

Appreciate you taking the time to test. I’ll try converting them to Dataviews next week and see if that’s what I’ll have to do.

Just to close this out in case it is useful to anyone down the road…

I was NOT able to use the Open-URL onClick event on a grid column generated directly from a BAQ. However, if I created a BAQ DataView, it worked.

1 Like