NAS automation problem

kryankerkryanker Member Posts: 14
Hi anyone,

Help :cry: !!!
My office are using NAV 5.0 as our support log tracking system. I had customized a function to send out an email with attachment every morning. The email attachment is the excel file which generated by a running report in NAV. NAS will be perform the schedule running for this function.

On earlier state the function is still running fine. But, while user start to complain didn't receive the email and I check on Job Queue Log Entries. It was an error message showing as below:

This message is for C/AL programmers:

Could not create an instance of the OLE control or Automation server identified by
GUID={A378E78B-5DB6-45E9-B598-9ED74A7CCCE1}
1.0:{30E9A1F9-9B22-4D26-91CF-C6CC2D9BC2D9}:'Navision Attain Hash 1.0'.BSTRConverter.
Check


I had tried many times re-register the control on that server and restart NAS but the results are still same. This error message was only show on NAS running, it was working fine if I manually run for this function.

My Variables:
BSTRConverterAttachFileName Automation 'Navision Attain Hash 1.0'.BSTRConverter

My processing codes:
  BSTRConverterAttachFileName.ResetBSTR;
  BSTRConverterAttachFileName.AppendNextStringPortion(AttachFileName);
  OAttachments := OSendMail.Attachments;
  OAttachment := OAttachments.Add(BSTRConverterAttachFileName);

It is not seem to be coding problem because it work fine when I run it manually. I was suffering to run the function manually every morning in order to get the email delivered to user. :(

Please give some advice. thanks [-o<

Comments

  • Luc_VanDyckLuc_VanDyck Member, Moderator, Administrator Posts: 3,633
    kryanker wrote:
    Please give some advice. thanks [-o<
    My advice: use SMTP-mail instead of Outlook automation to send out your mails.
    No support using PM or e-mail - Please use this forum. BC TechDays 2024: 13 & 14 June 2024, Antwerp (Belgium)
  • Jorge_Torres_[MSFT]Jorge_Torres_[MSFT] Member, Microsoft Employee Posts: 29
    Have you verified that the necessary component is being found by the system? Try using File Monitor or Process Monitor (both on technet) to verify that the necessary binary is indeed read.
    “This posting is provided "AS IS" with no warranties, and confers no rights.”
Sign In or Register to comment.