Hi, I designed a screen that imports data from Excel to create shippers by COM. The file that contains the information also includes a column with the Company. I am using the following structure to Login into SL:
sivtbCurrent.Login(bpes.DBServerSystem, bpes.DBNameSystem, bpes.CpnyID, bpes.UserId, "Password")
It works fine if I leave the password in the code (for example for SYSADMIN); but this is not practical, because the password has to be dynamic; the program has to pass the correct password of the user who is running the process. How can I send this parameter dynamically?. I tried sending the value PNULL, NOTHING, blanks, ect, and it doesn't work. In the UserRec table the passwords are encrypted, and I can't use them.
Thanks.
Hi Ajitkannan; at the end I solved this problem changing the authentication of Dynamics as Windows Authentication. On this way, I use the following functions without problems:
sivtbCurrent.Login(bpes.DBServerSystem, bpes.DBNameSystem, bpes.CpnyID, bpes.UserId, "")
FormComm = sivtbCurrent.StartApplication("4011000.exe", "0060")
I left the password in blank, and due to the authentication, SL doesn't validate the password, and I can use them dinamically, what is the way I need to have.
Thank you very much for your help.
Regards,
Hi Alberto Viveros,
The folder as Import-export must be creating in SL root folder and Place the .ini file under import-export folder. Also mention the Directory Path in process screen.
proceed with the below mentioned steps.
Ex: My.Application.Info.DirectoryPath & "\" & EXPIMPPATH (.INI file)
2. AppStart – Mention the Directory Path
Ex: SIVTb.StartApplication (My.Application.Info.DirectoryPath & "\OM\" & SIVExe (4011000.exe))
3. AppCtrlInstantiate – Define the Shipper Header & Detail control
4. Insert the Shipper Data
Thanks,
Ajitkannan
I forgot to mention that the user is already logged in to Dynamics; and he is going to work in a new screen which executes the Shipment screen in SL. So it is not necessary that the user log in to Dynamics. If I am registering data in the same company where I am logged in, the function:
FormComm = StartAppAndAutomate("4011000.exe", iSolErr, iOSErr)
works corrrectly. But if the user needs to register data for other company, the previous function doesn't work; I can't pass the parameter of company. Instead of that, I use this function:
FormComm = sivtbCurrent.StartApplication("4011000.exe", "0060")
In the second parameter I send the company. The problem is that if I want to use the "StartApplication" function I need to use before the login event:
sivtbCurrent.Login(bpes.DBServerSystem, bpes.DBNameSystem, bpes.CpnyID, bpes.UserId, "Password")
If I forget to put this function previously, an error message appears saying "Not logged in".
And here is where I have the problem; how can I pass the password if I don't know it?.
Regards.
Thanks Ajit, I made the test creating the file exactly in the same way than your example; I copied it under SL folder, but it is not updated when I change the password in SL; what I am doing bad?; in theory this file should be updated automatically by Dynamics for each user only if I place it under SL folder?.
Hi Alberto Viveros,
We could handle this through .INI file.
In that INI file, We could define the necessary information like Drive path, Folder & Password etc. (Refer the below screen shot)
Get the Password value from INI file and pass that value through sivtbCurrent.Login parameters.
Also you need to place this INI file under SL root folder.
Thanks,
Ajit Kannan
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 290,522 Super User 2024 Season 2
Martin Dráb 228,441 Most Valuable Professional
nmaenpaa 101,148