locked
setStateDynamicEntity (status) RRS feed

  • Question

  • Hello,


    I have a problem when I try to get Status with this code in pluging (activities for example phonecall):

    EntityReference llamada = (EntityReference)context.InputParameters["EntityMoniker"];
    var state = (OptionSetValue)context.InputParameters["State"];
    var status = (OptionSetValue)context.InputParameters["Status"];


    I dont know but it return me always -1.


    In this page  http://msdn.microsoft.com/en-us/library/hh155303.aspx  i dont see this value.. what does it mean?

    Any idea?

    Thx

    Wednesday, October 30, 2013 7:55 AM

All replies

  • Set the Message to SetStateDynamicEntity and use Post operation should find the new value for the status.
    I setup my plugin for CASE when ReActivate a CASE and it work.

    Make sure to "Vote as Helpful" and "Mark As Answer",if you get answer of your question.

    Wednesday, October 30, 2013 8:09 PM
  • statuscode = -1 is a valid value, and it indicates that the default statuscode should be used for the supplied statecode

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

    Wednesday, October 30, 2013 9:18 PM
    Moderator
  • Thank you for yours replies,


    Litonn, yes I have the message with this configuration, when this activity marked as completed first all works well, , it returns me this:  state =1 status =2, but now no..


    David, but there are any way to know what happend? becouse in activity phonecall i dont have problem If this activity is completed ok but, email I need to now if this activity is completed send, not pending.

    I would like to know any way to investigate what happend with this -1 because in database is 2.

    thank you for all.

    Thursday, October 31, 2013 9:22 AM