CRM 2013: Differentiate various fields for update in a WFA plugin (C#) RRS feed

  • Question

  • I have created a plugin (C# code dll) which I am using as step of a custom workflow. I want this workflow to kick in the case of

    Update. But it is for multiple fields and the action would be different for each of them.

    Now, I am wondering how in my C# code


    I could distinguish the different fields

    Hasibur Rahman

    Friday, May 15, 2015 12:59 AM

All replies

  • Hi,

    You should code all actions far all your fields. So, what is your problem?

    Friday, May 15, 2015 11:17 AM
  • The custom workflow activity does not get passed information about the field changes that triggered the workflow. If you need different behaviour based on different fields in a custom workflow activity then I can think of two ways to do this:

    • You could create separate workflows, each triggered on a different field changing, as pass this information into the CWA as a parameter. However, if a user changed multiple fields in one go, then you'll get multiple field executions
    • You could write a plugin on the Update message that identifies which fields have changed, and store that information somewhere (probably a custom field on the entity) for the CWA to read

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

    Friday, May 15, 2015 11:31 AM