david7
21st October 2014, 15:05
Hi all,
I have wrote a script that has been working forever, even from webtop. Now I have tried it from the new HTML WebUI and I got an error that this function is not supported in the HTML WebUI: server2client
Is there any other function that I can use to copy files from the server to the client (and Vice Versa)?
What about starting applications on the client?
Any ideas?
~ D7
sachinbaan
21st October 2014, 15:15
Hi,
Try this, for ming.le
if tc.is.html.ui() then
client.download.file(Filename)
endif
david7
21st October 2014, 15:21
Hi,
Try this,
if tc.is.html.ui() then
client.download.file(Filename)
endif
Hi,
Thank you for your reply.
What about the other functions like client2server, start.application.local, create.local.directory and the others in ottdllbw?
Is there any documentation?
~ D7
benito
21st October 2014, 15:44
maybe you can download the latest ming.le help file for the unsupported commands. i hope it's not too many.
david7
21st October 2014, 15:50
Thanks again,
tc.is.html.ui() was compiled successfully. But, client.download.file() was not. Is there any DLL that replaces the ottdllbw? One that should be declared with #pragma?
~ D7
BaanInOhio
21st October 2014, 15:59
Get the latest enterprise programmers guide from Infor and search for "htmlui". Many client/server based functions are no longer available, including file transfer and browsing on the client. Some of the replacements are not one-to-one. The replacement for client2server does the browse and the file transfer in a single call. Worst part is that programming will be needed around the client/server and file/directory functions to check for UI mode and call one or the other unless completely running in HTMLUI. Also, form fields for specifying a client file or client folder have to be hidden when running in HTMLUI mode.
Most require including "<bic_desktop>" in the program script.
The following functions are not supported when the client runs in HTMLUI mode:
client2server()
server2client()
create.local.file()
create.local.directory()
dir.select.dialog.local()
get.client.directory()
get.client.hostname()
get.local.filename()
remove.local.directory()
remove.local.file()
seq.fstat.local()
seq.open.dialog.local()
seq.open.dialog.next()
seq.saveas.dialog.local()
start.application.local()
The following functions have to be used when the client runs in HTMLUI mode:
client.upload.file - combines client2server with 'dialog' functions
client.download.file - combines server2client with 'dialog' functions
client.show.file
client.prepare.download
client.add.download.file
client.start.download
client.upload.files
client.get.upload.filecount()
client.get.upload.file
client.delete.upload.file.object
Determine mode of UI to select function to call:
get.ui.mode() - NO_UI (without a User Interface), BW_UI (UI is bw client)
WEBUI_CLASSIC UI (thin-client in classic mode), WEBUI_COMMONUI UI (thin-client in commonUI mode), HTML_UI UI (thin-client running in HTMLUI mode)
tc.is.html.ui() - returns 'true' true when running with the thin-client in HTMLUI mode
tc.is.thin.client()
client.get.media.type
david7
21st October 2014, 16:09
Thanks a lot! That helps .
I will ask our IT to download the files from infor and check them out.
Meanwhile, I see that there is no way to start an application on the client (replacement for start.application.local) .. Am I correct?
~ D7
BaanInOhio
21st October 2014, 18:41
I think that it is an option in the new combined utilities. Providing a MIME type as the 2nd argument of client.download.file (server2client replacement) should start the application identified by the MIME type for the downloaded file.
I haven't had the opportunity to try all features using HTMLUI, but I assume that this is how it would work.
rochus
21st October 2014, 23:59
there is an infor document describing the changes
"lnui_ds-11.0-en-US-1.pdf"
ulrich.fuchs
22nd October 2014, 12:09
Correct, there is no direct way supported to start an application on the client. That's really a bad lack of functionality in HTMLUI compared to the "old" interfaces, since this functionality is used by many Infor customers for various integration scenarios. I can only urge every customer to file incidents with Infor on that subject, so that they have the pressure to fix it.
best regards
Uli
david7
23rd October 2014, 09:53
Thanks for all the help. That is really appreciated.
I am having some trouble downloading the new programmers guide from infor. I just cant find it! I downloaded a Development guide (Infor ERP Enterprise Development Tools (LN)) and the UI Difference Study but couldn't find the programmer guide. I need that one to see the documentations for the new functions.
Any tips?
~ D7
andreas.toepper
23rd October 2014, 10:37
Please check KB 22924522. There you'll find the programmer guides.
david7
23rd October 2014, 12:12
Please check KB 22924522. There you'll find the programmer guides.
Thank you that helped.
Though we are very disappointed by this change. A lot of work is needed to all our programs.
~ D7
david7
3rd March 2015, 08:35
I think that it is an option in the new combined utilities. Providing a MIME type as the 2nd argument of client.download.file (server2client replacement) should start the application identified by the MIME type for the downloaded file.
I haven't had the opportunity to try all features using HTMLUI, but I assume that this is how it would work.
Hi again,
I have been trying to find a way to run an application on the client (from HtmlUI ) but without any success..
Can you please explain how can this be done? can you give me an example?
~ D7
bhushanchanda
3rd March 2015, 10:39
Hi,
Until Infor releases a fix, there are other utilities to do that -
Here's one for Windows - PsExec (https://technet.microsoft.com/en-in/sysinternals/bb897553.aspx)
With proper code you can do wonders with this.
david7
6th April 2015, 10:12
Hi guys,
I am still struggling with start.application.local. I could not find a way to do it from Baan tools. I have thought of lots of other ways out side of Baan, but is there a chance that Infor will make a similar function to work in HTML UI? Or is there a hidden function that I missed?!
~ D7
george7a
8th April 2015, 09:37
David,
It seems the documentation does not specify any function that does what start.application.local do. I second Uli`s suggestion:
Correct, there is no direct way supported to start an application on the client. That's really a bad lack of functionality in HTMLUI compared to the "old" interfaces, since this functionality is used by many Infor customers for various integration scenarios. I can only urge every customer to file incidents with Infor on that subject, so that they have the pressure to fix it.
Uli
Although, I am doubtful that it can be done without installing a program on the client. If this is the solution (installing a program on the client), we can program it ourselves!
benito
14th May 2018, 18:30
I have a problem with this command. If I make the destination as $BSE\tmp it gives me a warning that it is a directory and doesn't do anything then freezes. If I make it "", then it gives me the proper dialogue where I can pick the file from my client for uploading but then I lose backend connection (severe error!). I tried it also with just the filename as the argument. What is the proper way to use this command?
function long client.upload.file (string destination [, ref string client.filename] [, ref string mime.type])
Hi,
Try this, for ming.le
if tc.is.html.ui() then
client.download.file(Filename)
endif
andreas.toepper
15th May 2018, 08:43
Client.upload.file() and Client,download.file() will transfer one single file to or from the Server. Be aware that your LN user will need to have access rights on the file. The LN user may be the single sign on user used defined in ttams0100m000 if you are using SSO (I'm not quite sure, but better check it anyway).
Here the way I did downloading a file in a session script:
|Download file in LNUI.
if tc.is.html.ui() then
ret = client.download.file(source.path, "TEXT", "p" & ttadv230.cmod(1;3)
& strip$(ttadv230.cprs) & "0"
& ".bc")
if ret <> 0 then
message("error: %d", ret)
endif
else
message("Download von " & source.path & " in LNUI")
endif
Parameters are:
- source file name (name of file on server; needs the path in the filename as far as I can tell)
- mime.type (optional)
- target file name (optional; name of file on client; I'm using it without any given path, so it's file name only)
I've also used uploading in a session I migrated from FP8+:
tmp.file = bse.tmp.dir$()&"/importlist.txt"
if tc.is.html.ui() then |AT#05.sn
client.upload.file(tmp.file, filepath)
else |AT#05.en
client2server(filepath, tmp.file, true, false, false)
endif |AT#05.n
Here filepath is a field on the mask, where you need to enter the source filename (it's the name of the file on the client). Well, that's the definition given in the programmers guide, I didn't use this functionality. If filepath is empty LNUI will show a little dialog where you can search or enter a filename (that's what I'm using right now).
benito
15th May 2018, 16:08
THANKS A TON Andreas!!! That certainly worked.
client.upload.file(tmp.file, file)
From my debugging:
- tmp.file is the temp file that will be created in the remote server directory. This is the file that you need to READ later. For example: $BSE_TMP & "/readme.txt"
- file is the name of the file that you're going to pick from the dialogue box. The dialogue box will appear, you search your file from the client, once you double click , it will pick the name of the file and assign it to "file". In programmer's guide it's a call by Reference (REF).
andreas.toepper
15th May 2018, 16:22
In programmer's guide it's a call by Reference (REF).
Thank you! I missed that one. It's good to know it works this way.
avpatil
30th October 2020, 12:15
Thanks Andreas, I will try solution. I was able to read the file, from my code that I wrote using tip from Bhusham example,but when I pass the name of server file in DLL I cannot open it, but surprisingly I cam open the file in program script using seq.open()