Quantcast
Viewing all articles
Browse latest Browse all 888

How to create and send Appointment request through custom workflow

Hi All,

I am working on Appointment entity.

My requirement is, as soon as user Save the Appointment record in CRM, one OOB workflow will run and it will call custom workfloe internally.

In Custom workflow, I am using the below code:

// Sets up and creates an outlook calender entry
Outlook.Application outlookApp = new Outlook.Application(); // creates new outlook app
Outlook.AppointmentItem oAppointment = (Outlook.AppointmentItem)outlookApp.CreateItem(Outlook.OlItemType.olAppointmentItem);// creates a new appointment

However, I got the below error at 1st line above itself.
Error:
"Exception: Retrieving the COM class factory for component with CLSID {0006F03A-0000-0000-C000-000000000046} failed due to the following error: 80070005 Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))"
 
Also I got the error in Eventviewer --> Windows Log --> System (172.27.35.76)
 
"The machine-default permission settings do not grant Local Activation permission for the COM Server application with CLSID {0006F03A-0000-0000-C000-000000000046}  and APPID  {00020D09-0000-0000-C000-000000000046}
to the user NT AUTHORITY\NETWORK SERVICE SID (S-1-5-20) from address LocalHost (Using LRPC). This security permission can be modified using the Component Services administrative tool."
 

Also I tried to use EWS services:

In Custom workflow, I am getting the below error:

The request failed. The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel.

Here i am simply using

ExchangeService service = new ExchangeService(ExchangeVersion.Exchange2010_SP1);

Can one please suggest or guide me that where i am doing wrong? As this is very critical and urgent requirement, I need to fix this issue ASAP.

Please suggest.

Regards,

Ashwini Kumar


Viewing all articles
Browse latest Browse all 888


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>