Is anyone come across to upload csv file to update Materials using Excel VBA?
This script was created by my predecessor and was working till last year. But Since december 2018 , it stopped working. When I tried to troubleshoot I get the validation error "Cannot DEtermine Supplier Type. Unknown error" .
When I checked the return message from the object , I could see the msg as '
<span class="left title">Session expired</span>
<div style="margin: 5px 10px;">
Your current session in this tab has expired, most likely because you have logged in to simPRO in another window or tab. Your session has been refreshed, but your most recent action has not been completed. </div>
<div class="hCenter">
<button class='btnSec btnBlue dialogClose'>OK</button> </div>
-------------------------
Here's the script for checking. I have a doubt that Simpro URL might have changed. Truly appreciate if someone can help on this to resolve.
With CreateObject("MSXML2.XMLHTTP")
'log in
.Open "POST", "https://CompanyName.simprosuite.com/", False
.setRequestHeader "Content-Type", "application/x-www-form-urlencoded"
.Send "loginUsername=" & username & "&loginPassword=" & password & "&login_x="
.Open "POST", "https://mettler.simprosuite.com/staff/i ... xCall=true", False
.setRequestHeader "Content-Type", "multipart/form-data; boundary=" & Boundary
.Send SendData
.Open "POST", "https://CompanyName.simprosuite.com/sta ... ge=Generic", False
.setRequestHeader "Content-Type", "application/x-www-form-urlencoded"
.Send "columns%5B%5D=Group&columns%5B%5D=Part_Number&columns%5B%5D=Desription&columns%5B%5D=Cost_Price&columns%5B%5D=Trade_Price&submitForm="
.Open "POST", "https://CompanyName.simprosuite.com/sta ... ge=Generic", False
.setRequestHeader "Content-Type", "application/x-www-form-urlencoded"
.Send "supplierType=0"
end with
Thank you.
Regards,
Sam
DEVELOPER CENTER