Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Plugin Error - Task Creation

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi,

can someone help me to resolve this issue

 

Entity newTaskInstance = new Entity("task");

newTaskInstance["scheduledstart"] = DateTime.Now;

newTaskInstance["scheduledend"] = DateTime.Now.AddDays(7);

if (context.OutputParameters.Contains("id"))

{

Guid regardingobjectid = new Guid(context.OutputParameters["id"].ToString());

string regardingobjectidType = "incident";

newTaskInstance["regardingobjectid"] = new EntityReference(regardingobjectidType, regardingobjectid);

}  

tracingService.Trace("Recurrence Task plugin: Creating the recurrence task activity."); //service.Create(newTaskInstance); 

 

Note: the last line of code throws an error, any idea as how to resolve this, this is CRM 2015 online solution.

 

Thanks

*This post is locked for comments

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Plugin Error - Task Creation

    Hi Anil,

    yes, that's right

  • anilambadan Profile Picture
    anilambadan 1,160 on at
    RE: Plugin Error - Task Creation

    waiting for Guido's answer

  • anilambadan Profile Picture
    anilambadan 1,160 on at
    RE: Plugin Error - Task Creation

    Want to create another task on creation of task? plugin registered on post task  create?

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Plugin Error - Task Creation

    Hi Guido,

    yes, changing to Asynchronous worked :), may i know why i had to change that and why it did not work in synchronous mode

    Thanks

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Plugin Error - Task Creation

    yes, want to create another task when a task is created, the plug in is registered in the create message [post event]

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Plugin Error - Task Creation

    Hi Aileen,

    yes, want to create another task when a task is created, the plug in is registered as a post event

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Plugin Error - Task Creation

    Hi Aileen,

    yes, when creating task, i want to create another task, its registered in post event

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Plugin Error - Task Creation

    Below is the error

    Unhandled Exception: System.ServiceModel.FaultException`1[[Microsoft.Xrm.Sdk.OrganizationServiceFault, Microsoft.Xrm.Sdk, Version=7.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]: An error occurred in the Recurrence Task plug-in.Detail:

    <OrganizationServiceFault xmlns:i="www.w3.org/.../XMLSchema-instance&quot; xmlns="schemas.microsoft.com/.../Contracts&quot;>

     <ErrorCode>-2147220891</ErrorCode>

     <ErrorDetails xmlns:d2p1="schemas.datacontract.org/.../System.Collections.Generic&quot;>

       <KeyValuePairOfstringanyType>

         <d2p1:key>OperationStatus</d2p1:key>

         <d2p1:value xmlns:d4p1="www.w3.org/.../XMLSchema&quot; i:type="d4p1:string">0</d2p1:value>

       </KeyValuePairOfstringanyType>

       <KeyValuePairOfstringanyType>

         <d2p1:key>SubErrorCode</d2p1:key>

         <d2p1:value xmlns:d4p1="www.w3.org/.../XMLSchema&quot; i:type="d4p1:string">-2146233088</d2p1:value>

       </KeyValuePairOfstringanyType>

     </ErrorDetails>

     <Message>An error occurred in the Recurrence Task plug-in.</Message>

     <Timestamp>2015-09-09T15:18:44.9949496Z</Timestamp>

     <InnerFault i:nil="true" />

     <TraceText>

    [SunEdison.CRMPlugins: Plugins.RecurrenceTaskPlugin]

    [980df9db-f356-e511-80de-3863bb3ca578: Plugins.RecurrenceTaskPlugin: Create of task]

    Recurrence Task plugin: Creating the recurrence task activity.

    </TraceText>

    </OrganizationServiceFault>

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

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Tip: Become a User Group leader!

Join the ranks of valued community UG leaders

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,516 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,321 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans