Kinetic - Picture Box

Using the Classic UI on version 2022.2.10 - I display a jpeg image of Parts:

Using a screen customisation:

  1. I define a path - string path = @"\\xxx\xxxxxxx\xxxxxxxxxx";
  2. I define a filename - string filename = view.dataView[args.Row]["PartNum"].ToString() + ".jpg";
  3. If the file exists, I then display the image.

Has anyone done similar in Kinetic or know how this might be achieved.

I know I will need to attach my code to something triggered through JobEntry.

I have not played around with images within Epicor (yet)… but Kinetic App Studio has a Picture Box widget. Perhaps you can start here:

Create function to convert unc path into base64 string and store in TransView.ImageContent (adjust to the picturebox epbinding)

Thanks @isnaeni.nurfalah - I’ll give this a try.

Thanks @dcamlin - I’ve had a look at Experts’ Corner post and it’s an excellent resource.

Thank you @hmwillett for creating such a helpful resource.

Any chance you walk through this a little more in depth? I think that I understand the concept but would LOVE to see an example of the Event workflow and Function being used if you wouldn’t mind sharing

1 Like

In my case, i am load picture form last attachment image from table. So, i used trigger event after aftergetbyid to call function.

image

Function used:
ImageHelper.efxb (15.9 KB)

2 Likes

Thank you so much for your help and such a fast response!

1 Like

@rppmorris

We were wondering about this as well in Kinetic… Seems like this is something they overlooked or should be working on (if they are not already). This is a great candidate for Epicor Ideas, if it’s not already up there…

We will probably come back to this thread at somepoint and try what is suggested above - if you end up coding something that works well for you, please pass it on via a follow-up reply.

Thanks!

There are a couple of things going on here.

UNC paths are not accessible to web pages for obvious security reasons. A web page/script should not have access to local resources. That is why it worked with a DOTNET application and not a Kinetic page.

The solution is to serve the file up using https. @isnaeni.nurfalah is doing this by storing the image in the Kinetic database instead of a network share and delivering it via an Epicor Function exposed via https.

This solution assumes this is the only place that image appears. If we want to use that image in other applications (M365 or another web app) then one would have to either keep a second copy of the image outside of the Kinetic database for non-Kinetic users to access or use Kinetic has a file server and add Kinetic licenses to all users who need to access that image.

If we use IIS to serve up those images, then one could use the PictureBox with a Link attachment type in Kinetic and also serve the images to non-Kinetic users.

Bonus, in the web server solution, images will be cached. With the Epicor function, they will be served every time.

Epicor has a solution with the Edge Client that is supposed to work with file shares. It becomes the web server for UNC files.

1 Like