locked
Activity Pointer With ID="" Cannot be found RRS feed

  • Question

  • Hi  all ,

          I have a requirment where i want to create an activity when we create another activity it will based on a template defined in the same and here what i did is i have written a plugin to achieve this and when create a actvity record it will create the other activities as specified in the template record so its working fine .. but problem is i need to have a 1:N realtionship with the both entities and when we create the entity in plugin i had tries setting up the lookup field value to current entity value

          entity = (Entity)context.InputParameters["Target"];

          EntityReference ps=new EntityReference();
                        ps.Id=entity.Id;
                        ps.LogicalName=entity.LogicalName;

          pswaypoint.new_ProcessSchedule = ps;

          pswaypoint.new_name="Child Task !!";

          service.create(pswaypoint);

     when i execute the plugin ... i get the following error ..."Activity Pointer With ID="GUID" Cannot be found "

    i understood its giving error because the actvity is not yet created .... how can i resolve this issue ..

    please guide me on this ...... !

       

     


    With Regards Athul MT http://www.athulmt.blogspot.in/

    Friday, September 21, 2012 9:00 AM

Answers

  •  Hi David ,

        I have tried registering the plugin as post operation only .. i have resolved the issue when i register the plugin synchronous post operation it will be throwing the error and when i made it in to asynchronous its working fine ...

    anyway thanks for your reply !!




    With Regards Athul MT http://www.athulmt.blogspot.in/

    • Marked as answer by Athul MT Tuesday, September 25, 2012 7:35 AM
    Tuesday, September 25, 2012 7:35 AM

All replies

  • What stage is the plugin step registered on ? If it's on a pre-stage (stage = 10 or 20), then the activity will not yet exist. Try registering the step on the post stage

    Microsoft CRM MVP - http://mscrmuk.blogspot.com/ http://www.excitation.co.uk

    Friday, September 21, 2012 3:13 PM
    Moderator
  •  Hi David ,

        I have tried registering the plugin as post operation only .. i have resolved the issue when i register the plugin synchronous post operation it will be throwing the error and when i made it in to asynchronous its working fine ...

    anyway thanks for your reply !!




    With Regards Athul MT http://www.athulmt.blogspot.in/

    • Marked as answer by Athul MT Tuesday, September 25, 2012 7:35 AM
    Tuesday, September 25, 2012 7:35 AM