Sending Attachments from Navision

sankar
sankar Member Posts: 79
Hi All,

Could you please let me know how to send more than one attachments from navision by using any code ?
Everything is Possible

Comments

  • Savatage
    Savatage Member Posts: 7,142
    search the forum for "Attachment" then "Attachments" (I think you get different results)

    anyway... there will be 2 or 3 pages of posts.
    http://www.mibuso.com/forum/search.php
  • smkolsoft
    smkolsoft Member Posts: 53
    I have tweaked codeunit 397 a bit to do achieve this...
    if u want i can send u the code....
  • sankar
    sankar Member Posts: 79
    Thanks SMK,

    Please send me the code and procedures how to sent two attachments..

    Thanks in advance....
    Everything is Possible
  • smkolsoft
    smkolsoft Member Posts: 53
    Dear Shankar

    sending multiple attchements by codeunit 397 is simple
    ....just do this ....

    in cu397 in function NewMessage()....u need to attach 2 more param
    1. mltiattach ---- boolean
    2. myattachrec --- a record variable of a custom table which will have the path to different attachements.
    IF multiattach THEN
    Repeat
    BSTRConverterAttachFileName.ResetBSTR;
    BSTRConverterAttachFileName.AppendNextStringPortion(myattachrec.filepath);
    OAttachments := OSendMail.Attachments;
    OAttachment := OAttachments.Add(BSTRConverterAttachFileName);
    Until myattachrec.next = 0;

    Hope u will take the clue ...and can create the custom table....
    If u stiil need more clarification ....then i will send u the fob.
  • sankar
    sankar Member Posts: 79
    Dear smk,

    Thanks for the reply...

    I have small query.. How to declare BSTRConverterAttachFileName ?

    If possible please send me the fob..

    Many thanks SMK... Thanks again.
    Everything is Possible
  • smkolsoft
    smkolsoft Member Posts: 53
    Dear Sankar
    I hope you are using Nav ver 4.0.....
    If so then you need not declare BSTRConverterAttachfilename because
    it is already declared in C/AL global.

    the type is Automation and subtype is 'Navision Attain Hash 1.0'.BSTRConverter.
  • sankar
    sankar Member Posts: 79
    Dear SMK,

    I am using navision 3.7. Is this automation is available in 3.7 ? Kindly reply...
    Everything is Possible
  • sankar
    sankar Member Posts: 79
    Is it possible for you to send the fob or send the text of the code to me including the table details..

    Thanks in advance SMK..
    Everything is Possible