Custom Workflow Assembly: How to pass Customer or RegardingObjectId as Parameters RRS feed

  • Question

  • I want to create a CWA that passes & returns the RegardingObjectID of an Activity, ParentCustomerId of Contact and CustomerId of Incident (Case). All of these are EntityReference attributes, so according to the MSDN docs a ReferenceTargetAttribute needs to be specified. But what entity do you use? Customer can be account or contact, whilst regardingobjectid can link to a whole range of entities.

    The Docs say that only 1 RegardingObjectId can be specified, but clearly we don't know in advance the entity name & we don't want to restrict our CWA to just one of the entity types.

    So is it impossible to develop a CWA passing these 2 types of attributes?

    You could hack around in the workflow for account/contact, but not for regardingobjectid.

    Monday, July 15, 2013 4:22 PM

All replies

  • Hi,

    A input parameter must have the reference target specified, so a parameter that can be of any type is not supported.

    The only option is to pass the attribute name as a string parameter - and then retrieve the value programatically inside your custom activity. 


    Scott Durow
    Blog www.develop1.net    Follow Me
    If this post answers your question, please click "Mark As Answer" on the post and "Mark as Helpful"

    Tuesday, July 16, 2013 7:07 AM