URL's to either full Epicor client or Web Access?

I’m very interested in this, it’s something I have considered in the past and never dug into it much as short of the File > Send feature I couldn’t figure out how to make it dynamic.
For instance, if I understand what @pbparker is saying, is that he has outside systems that have some of the Epicor key field data, such as Job Numbers and these outside systems can or can be queried to generate HTML URL links… likewise, if I were in Epicor I could use a BAQ/Dashboard to create dynamic URL links, like for dynamically creating a QR code:

But with what has been posted so far and from what I’ve looked into in the past, is that what the Epicor client needs is the .mfgsys file which the OS can recognize as a file to be opened by the Epicor client (but I found this file association does not happen on install and needs to be created manually or with a GPO or logon script) and it contains the key data to open that record in Epicor.
And Simon mentioned he uses a template… ok, so how do we dynamically on the fly dynamically change the content of the template as it’s downloaded? Is that what is needed or am I missing something simpler here. Cause all @pbparker really seems to have is a Job number for his URL link.
Maybe I’m missing something,but it sounds like there needs to be a script or something that his URL points at and passes the Job number and that script then takes the template, replaces ‘token’ data with the passed Job number and offers that to the browser for download.
:exploding_head:

To do it dynamically I would use a web scripting language, like C# to build the webpage smarts, or Php

If you don’t have full Visual Studio, you should be able to use VS Community to do this, which you will probably have if you are doing debugging. I recall that was mentioned in another post.

You could probably do something similar with the QR Codes, I am sure there is a library which would do all the work, or even more fun a REST API on the internet somewhere.

1 Like

I’ve already related the sysconfig extension to Epicor and yes, it properly opens up the job tracker as everyone has said. However, as Rick indicated - what exactly am I looking to script on the web page, the entire sysconfig logic or just something to pass the job number into the execution of the sysconfig call?

This is 10.1.600.6 I’m on and I’m using PHP for the logic of the web pages. The purpose is I’ve created a web based dashboard for all upcoming jobs by resource groups and resources by date that allows the assigning of employees to individual ops.

1 Like

If your using Php you should be able to dynamically create the file based on the template, use PHP to replace the relevant strings and there you go.

Probably oversimplfied that a bit, you may need to create a file for each jobnumber as the page loads. That might cause a bit of overhead.

1 Like

Anyone actually done this? I have thousands of ops and thousands of jobs, I would really prefer not to have to generate thousands of files on the web server to launch from. Was hoping for a more dynamic process where the clicking of the job number executes.

You don’t have to generate thousands of files… have the files generate on the fly when they Click the button.
You save a copy of the “sample” xml file which looks like this and you store it on the server


But replace the RecordID with a easily unique “template” flag for example {REPLACE_ME_AT_RUNTIME}

Then when the user clicks “Launch In Epicor” you simply read the XML File in do a replace of your {REPLACE_ME_AT_RUNTIME} with the PartNum that you want and output that file down to the browser which will prompt you to “Save” or “Run” if the user clicks “Run” it will launch Epicor proper.

3 Likes

See this Post

2 Likes

So given @josecgomez example I’m thinking something like this might work for PHP…

(this was just thrown together in notepad as I thought this through, not tested or anything at all!)

So with a URL link of something like:
http://yourwebsiteserver/location/OpenEpicorFile.php?tmpt=job.mfgsys&key=123456
and the contents of OpenEpicorRecord.php would have something like this in it:

<?php
$tmplt = 'path/to/templates/' . $_Get['tmplt']
if     (file_exists($tmplt)) {

$file = file_get_contents($tmplt);

header('Content-Disposition: attachment; filename="OpenJob.mfgsys"');
header('Content-Type: text/plain'); 
header('Content-Length: ' . strlen($file));
header('Connection: close');

echo str_replace('{REPLACE_ME_AT_RUNTIME}', $_GET['key'], $file);
exit;
}

?>
4 Likes

Got it, makes sense now, thanks folks. Will work on a php script today and report back on how it goes.

Thanks @Rick_Bird #ShortOnTimeToWritePhP :wink:

1 Like

Also to reiterate @Jaicker_Avila post, if you have webaccess installed and have it working you probably don’t even need php, just the link as he provided an example in his post here

2 Likes

Yeah, I have already tried that and it works. I like the idea of having two links personally and allowing the user to select whether they want to launch the web client or the full client - so I’m going to write both methods.

post back with the final product if you can get it working.
(I’m curious how bad I butchered that PHP)
:wink:

1 Like

Great post everyone.

Thanks @pbparker if you do post your solution I’ll move this thread to the “Experts Corner” for posterity since it would answer both the question of how to do it in Web Access and how do it in the Fat Client. Let us know

2 Likes

Will do Jose, will post the template and the on the fly rewriting.

2 Likes

Just an update, was able to get both methods working fine. Let me clean up my hacked up code and share what I did.

It works nicely in IE. Chrome however seems to want to have the file downloaded to fire off the file - which isn’t very clean as it leaves all these files in the Downloads folder. For us it’s not a problem because we use IE for the company, but I could see this being a hangup for others.

3 Likes

Any code snippets you’d be willing to share in this post would be really great.

Found a few items of interest.

First, if you don’t have the full client running (not MES) and you click the link - it will fire and open the window (Job Tracker in my case) and consumes a DefaultUser (Full client) license. If you leave that window open and click another link, it will utilize that existing license. However if you still have that window open and then start your full client - it will consume an additional license. So - it’s best to have the full client running before clicking links to reduce license consumption (especially if you run tight on licenses).

The second issue is, and I haven’t worked through it yet so need some help - it consumes the full license and not a DataCollection (MES) license like I want it to.

Anyone know a way to force the MES client to open by setting the sysconfig to do so? I found a DataCollectionUser tag and set that to true - however that didn’t work.

Finally got a definitive answer from Epicor, unfortunately there is no way to fire from a .sysconfig file the Epicor client with a DataCollection (MES) license.

Anyone know in Epicor Web Access if it supports MES in 10.1.600?