Mark Complete button issue in plugin RRS feed

  • Question

  • Hi,

    I have plugin registered on "SetStateDynamicEntity" message on post operation, that checks the status of the phone call record when a phone call is closed.

    When I close the phone call "made" using the CLOSE PHONE CALL button then got the status reason value as 2 inside the plug-in.

    But when I use the MARK COMPLETE button the status reason value returned is -1.

    Here is my code.

    Int32 statusvalue = ((OptionSetValue)myContext.InputParameters["Status"]).Value; 

    Any help would be appreciated.



    Monday, August 1, 2016 9:10 AM

All replies

  • The value -1 indicates that the default statuscode for that statecode should be used. The different behaviour does make some sense, as the 'Mark Complete' indicates it should use the default status code, and 'Close' indicates a specific status code.

    As your plugin is on a post event, if you call Retrieve in the plugin you should get the actual statuscode that is set by the, rather than -1. I'm not sure if you could also use a postEntityImage to get this

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

    Monday, August 1, 2016 3:59 PM