web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Suggested Answer

microsoft.office.interop.outlook.applicationclass reset instance

(0) ShareShare
ReportReport
Posted on by 20

Hi!

First, sorry for my possibly bad English.

Im using the Microsoft.Office.Interop.Outlook.ApplicationClass.'Microsoft.Office.Interop.Outlook, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c' Dotnet to send emails from Navision (business central).

The problem is: my customer use the application from more than one Navision sessions, and then there is a conflict:

"changes made to the item were lost because of a reconnect with the server"

I need reset or close the app instance between calls, but I dont know how to do it.

My code is:

IF ISNULL(xApp) THEN //instantiate the variable
    xApp := xApp.ApplicationClass();
xMail := xApp.CreateItem(xItemType); //create the new mail
xMail."To" := FORMAT('E-mail'); //add the employee email
xMail.Subject('Subject');
xMail.HTMLBody := 'Body';
xMail.BodyFormat := 2;
xMail.Display(TRUE); //show the window of outlook

Thanks!!

I have the same question (0)
  • Suggested answer
    Marco Mels Profile Picture
    on at

    Hello,

    We currently do not have dedicated Dev support via the Dynamics 365 Business Central forums, but I wanted to provide you some additional resources to assist.  If you need assistance with debugging or coding I would recommend discussing this on one of our communities.

    www.yammer.com/dynamicsnavdev

    dynamicsuser.net/.../developers

    I will open this up to the community in case they have something to add.

    Thanks.

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 2,468

#2
YUN ZHU Profile Picture

YUN ZHU 923 Super User 2025 Season 2

#3
Sumit Singh Profile Picture

Sumit Singh 607

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans