Advertisements

Programmatically Creating Outlook Appointment in Navision

Dear Friends in this post I will discuss about creating Outlook Appointment from Navision using DotNet Interop. Without going much in theory lets jump to practical approach.

To start with first we need to define some DotNet variables:

Name DataType Subtype
OutlookItemType DotNet Microsoft.Office.Interop.Outlook.OlItemType.
‘Microsoft.Office.Interop.Outlook, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c’
outlookApplication DotNet Microsoft.Office.Interop.Outlook.Application.
‘Microsoft.Office.Interop.Outlook, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c’
outlookApplicationClass DotNet Microsoft.Office.Interop.Outlook.ApplicationClass.
‘Microsoft.Office.Interop.Outlook, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c’
outlookAppItem DotNet Microsoft.Office.Interop.Outlook.AppointmentItem.
‘Microsoft.Office.Interop.Outlook, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c’

I have created a function CreateOutlookAppointment which takes parameters as:

 

OAP1

And the code as below:

OAP2

To call this function I use below code:

OAP3

The code is itself self-explanatory.

You can add other validations and parameters as per the requirement.

Imp Tip:- Make sure you set for all DotNet Variables RunOnClient = Yes.

On run the output will be as:

OAP4

 

OAP5

 

What you are waiting for, go create Appointment and have fun.

See you seen via my next post. Till then keep learning and growing in your career.

 

 

Advertisements

Important

Most of the contents you find in this blog will be either inherited from MSDN or Navision Developer IT Pro Help. Some places images are also directly taken from these sites. Purpose is simple to try those stuffs and re-produce adding few things as per my understanding to make easy understanding for others and quick reference.

Here nothing under my own brand or authorship of the content. At any point of time we are just promoting Microsoft stuffs nothing personnel with same.

Hope stuffs used here will not violate any copyright agreement with them. In case by mistake or in-intestinally it happens and the Microsoft feels these should not be used Microsoft have full right to inform me about same and will be glad to take down any such content which may be violating the norms.

Purpose is to promote Navision and share with community.

FB Profile

Like FB Page

%d bloggers like this: