I've got a request to have the Vendor remittance PDFs attached to emails and sent out automatically.
I found this same guide across the net three times:
http://ishwar-nav.blogspot.com/2015/07/send-mail-with-pdf-attachment-in-nav.html
https://community.dynamics.com/nav/b/technicaltipsandtricksfordynamicsnav/archive/2015/07/31/creating-file-attachment-to-mail-for-report
https://dynnavashwini.blogspot.com/2015/07/creating-file-attachment-to-mail-for.html?showComment=1505144008566#c6673081894226421126
I also started a post on DUG here:
https://dynamicsuser.net/nav/f/developers/93711/auto-emailing-remittance-advice-with-nav-16
user sbhtbng replied with:
Step 1 - Right where you are printing the remittance add a option for Emailing
Step 2 - Save the report as PDF
Step 3 - Write a code to get the to email id where this document should go. Create the subject and body for the email.
Step 4 - Add the report as an attachment.
Step 5- Send the attachment as email.
I'm attempting to follow the guide linked above to accomplish this.
When I go to save my new codeunit I get an error message about
objScript.Language not being setup in cal globals. Looking at three examples of the solution above I don't see any mention of having to define any objscript things beyond the initial setting of the objScript Variables subtype to Microsoft Script Control 1.0 "ScriptControl".
I'm scouring the net for info on objScript or using VB within NAV codeunits but coming up kind of short.
Before I keep troubleshooting I wanted to check with you kind folks to make sure I'm on the right path here.
thanks so much, this one has been a bear.
*This post is locked for comments
I have the same question (0)I had an extra 'Language' within the code throwing the Variable Error.
Working on implementing the whole thing now.