I’m trying to get a PDF uploaded into the Attachment table silently.
First I have created a PDF file which is stored on my client (C:\Users\MyUserAccount\AppData\Local\Temp\MyApp\C3501751-6FB9-44B9-98EF-44965CB62426\Quote J00090.pdf). Then I call my function to upload the file.
UploadResult := UPLOADINTOSTREAM('','<TEMP>','',FileName,NewInStream);
But I’m getting this error:
‘Could not find file ‘C:\Users\MyUserAccount\AppData\Local\Temp\Microsoft Dynamics NAV\25388\Job Quote J00090.pdf’.’
Must I somehow create this server side file, or shouldn’t the UPLOADINTOSTREAM not do this automatically? Or what is wrong? If I’m running this without the “magicpath” then it works fine, but the user is prompted for the filename.