Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics NAV (Archived)

Email - Error Message

Posted on by Microsoft Employee

Hi,

Has anyone encountered an error message "An unexpected error occurred. Try the operation again or contact your system administrator." as shown below when clicking post and sales invoice?

Although the error message occurs, the sales invoice is posted successfully and email is received. It is just annoying that I have to click "OK" to move on.

Did I miss any setup?

Email-_2D00_-Error-Message.PNG

Regards,

Susy

*This post is locked for comments

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Email - Error Message

    The good star of the day. Great !

  • Verified answer
    Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Email - Error Message

    Thank you all for the answers.

    Finally fix the issue. I didn't have any setup under "Documents Layout" in Customer Card. The moment I populate it for Invoice, there is no error message.

  • Suggested answer
    Suresh Kulla Profile Picture
    Suresh Kulla 43,745 on at
    RE: Email - Error Message

    What is the value for ServerAttachmentFilePath ? can you make sure the service user has all the permissions for that folder. Other thing also check what is the value for ReportID and HeaderDoc(Filters, and Primary Key Values) and try to run the report for that manually and see if you get the report generated.

    You will get the error if there is no data and if no file is generated.

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Email - Error Message

    Thank you all for your feedback.

    I have tried on my laptop and on the server, both encounters the same error message.

    Debug the code and it seems the code error while trying to save the file as PDF into the folder.

    Email-_2D00_-Error-Debug-Break.PNG

     
      IF CustomReportLayout.GET(CustomReportSelection."Custom Report Layout ID") THEN BEGIN
        ReportLayoutSelection.SetTempLayoutSelected(CustomReportLayout.ID);
        REPORT.RUNMODAL(CustomReportSelection."Report ID",NOT HideDialog,FALSE,HeaderDoc);
        ReportLayoutSelection.SetTempLayoutSelected(0);
      END ELSE
        IF NOT REPORT.SAVEASPDF(ReportID,ServerAttachmentFilePath,HeaderDoc) THEN
          ERROR(ServerSaveAsPdfFailedErr);
     

    Where to set the default folder?

    Thanks.


    Regards,

     

    Susy

  • Suggested answer
    Suresh Kulla Profile Picture
    Suresh Kulla 43,745 on at
    RE: Email - Error Message

    I am thinking this could be because of SMTP, can you try this on the server and see if you get the same message or any other computer.

  • Suggested answer
    Amol Salvi Profile Picture
    Amol Salvi 18,694 on at
    RE: Email - Error Message

    Take help from developer and debug the error using debugger

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Email - Error Message

    Hi,

    Not trying debug ?

    Is your sent document saved on a disk path (client) as a file ?

    L

  • Suggested answer
    Maneesha Profile Picture
    Maneesha 5,889 on at
    RE: Email - Error Message

    Dear Susy K ,

    check whether your "Launch Application" & "email setup" are arrange properly  

    check email configuration

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Email - Error Message

    Hi Manish,

    It is standard.

  • ManishS Profile Picture
    ManishS 6,578 on at
    RE: Email - Error Message

    Is the email functionality customized or standard ?

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,214 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans