E9.2 Open a Windows Explorer window for a Folder on Thin Client

richslaney

richslaney

Member
Hi all,
I've created a solution for my client where they want to upload Customer documents into a folder on a server, and then store the details in the GT4801A Media Object by Work Order. Then, they can see the documents as attachments in the system etc.

So, the screen guides the user through some questions and then dynamically creates a Folder on the Server for the Work Order.
The user then uploads whatever files into the Work Order folder, and then clicks a button which then loops through the folder, picks each file from the Work Order Folder and then checks if it exists in GT4801A and if it doesn't, then inserts the GT4801A record in F00165.

This all works perfectly.

On a Fat Client I can run the Execute B34A1030 'ExecuteExternalProgram' to kick off a explorer.exe (windows Explorer) window (by sending a command = 'start %windir%\explorer.exe WorkOrderFolderPath') to display the Work Order folder created on the server for users. User can then dump the files and then close the window and Press a button on my form to upload the files in GT4801A.

Problem is on Thin Client this doesn't work.

So for now I display the Work Orders Folder Path in the Application for the user to 'Cut and Paste' into windows explorer themselves which works fine, but I'd much prefer to open a Windows Explorer sessions automatically and make a far slicker solution.

Note : I've also tried using Orchestrator to kick off various jRuby code I've found on the Web and none of it works, some statements say they worked (no errors) but didn't appear to do anything. I also tried putting the Work Orders Folder Path as a text constant on the form and made it 'clickable' and still nothing.

Is it even possible to do this on Thin Client?
Is JDE somehow stopping it from opening?
Has anyone else managed to open a specific folder path in Windows Explorer from thin client?

(JDE EnterpriseOne 9.2 - 9.2.6.3 - Oracle OCI)
 
I honestly don't know if this can or can't work, but the idea of windows letting java open a windows folder through the web just seems to me like something that'll be hard to sneak past virus scan / security / defender / firewalls / etc / etc.
 
You won't be able to do it through the web browser, but you should be able to use Orchestrator to access the shared folder using JRuby. The trick is to make certain the permissions for the share include the application server service account running the orchestration. The end user would provide a path to the folder (or just the folder name if these folders are going under the same parent folder). Then use Dir class to the list of files in the folder, and use the Attachment UDO to update the Media Objects.
 
Hi Rich

This is a cracker. What platform is your E1 running on?
How about sending them to an E1 Page full of java code to open a windows explorer session. That must be far easier?

Various places in E1 have the ability to open a windows explorer session right? BIP template screen P95600 for example enables us to open a directory tp upload the MS word template.
Have a nose around that ability and see what it's doing in P95600
 
This might not be 100% what you want and the system function below maybe specific to the BIP server location but hear me out.....

According to P95600 in debug, W95600B OK button line 49 system function (its n the XMLP Publisher set of system functions) opens a window explorer session to allow us to add the BIP template and this 100% works on the thin client (folder location seems cached from before and doesn't appear controllable)
Handy to know this one :)

Button Clicked
Upload Object Extended(FC Object Name EDIT, FC Object Description EDIT, FC Object Type EDIT, FC Product Code EDIT, FC Product System Code EDIT, FC Object Language EDIT, FC Object Region EDIT, ...)

1715981044724.png

It checks the file types though and can throw error 950G Invalid XML File Type from the return code of the system system function (must be a setting somewhere)

If it is specific to the BIP servers repository location, no bother, just immediiately after use the external command again to go find and move the file from the BIP server whereever you want using the servers native code. So a unix command or a windows copy command etc

E1 seems to be caching and saving the last windows folder location you go into too. Which is handy

If you can bust open the API it's using you maybe able to write your own in C++ or whatever it's doing. Maybe some one here smarter than me can help you with that, but this system fucntion does open a windows session on the thin
 

Attachments

  • 1715982051652.png
    1715982051652.png
    104.5 KB · Views: 2
Last edited:
Hi Rich

This is a cracker. What platform is your E1 running on?
How about sending them to an E1 Page full of java code to open a windows explorer session. That must be far easier?

Various places in E1 have the ability to open a windows explorer session right? BIP template screen P95600 for example enables us to open a directory tp upload the MS word template.
Have a nose around that ability and see what it's doing in P95600
Hi John,

Good shout... I took a look and P95600 uses a 'XML Publisher' System Function called 'Upload Object Extended', which physically does as you say and opens a Windows Explorer window (I knew I'd seen this happening, but couldn't remember where).

Sadly, you can't provide the parameters to it for the 'Path' which is what I need, as I automatically create a File path on the Server based on the Work Order Number, and then I want to Open the new Work Order Folder at the push of a button so that the User to then dump their 'Additional Documents' into it and I can then process into F00165.

Shame, but thanks for the suggestion.
 
I obviously don't know all the requirements so this might not work given all the requirements/constraints and I know you have a working solution in place and the file dialog is the only small missing piece but maybe you could rethink your solution slightly.

Create your own GT struct, key could simply be a run time generate GUID. You could have a form with an embedded MO control and an OK/Cancel button (this is the Windows Explorer dialog substitute in your solution). Have the users simply use the existing E1 MO UI to upload their files to the temporary custom GT. When they are done they could click Cancel and all the MOs would be deleted, or if they hit OK, you iterate them just like you would on the file system and and do the same logic you would with the file system but with the MOs on the temp GT - copy them to the WO MO and when done delete from the temp GT. Think of it as a temp work table, but MOs instead of DB recs.

Probably not as user friendly as what you designed but maybe a close 2nd if you want to keep the solution all within the out of the box JDE toolset.

As John pointed out you can trigger the O/S specific directory picker dialog but you may find it difficult to open in a specific folder. Under the covers it's most likely client side JavaScript or HTML to open the O/S specific directory picker dialog and you are probably limited to starting in Well Known Directories ("desktop", "documents", etc.) or the last directory selected by the user which means the user would need to navigate to the correct folder which of course means they could navigate to the wrong folder.
 
Last edited:
Sadly, you can't provide the parameters to it for the 'Path' which is what I need, as I automatically create a File path on the Server based on the Work Order Number, and then I want to Open the new Work Order Folder at the push of a button so that the User to then dump their 'Additional Documents' into it and I can then process into F00165.

Shame, but thanks for the suggestion.
Yeah I saw that, but it does seem to cache the last location you opened somewhere. So that's not too bad but not ideal.

My thought was they just 'upload' the file to the BIP server, THEN you go get that file and move it to you WO specific folder using external command.


plan B
make a java based page to upload the files and upload that java to an E1PAGE. This will 100% work but maybe something you're unfamiliar at uploading and getting working in E1.
But have a look at my JET posts on this. I'd gladly discuss it on the phone too by the way.
All you do really is replace the graphs I made with the java to open and upload a windows folder location.
 
Last edited:
Back
Top