CRM 4.0: GET / RETRIEVE Related entity record's GUID in workflow RRS feed

  • Question

  • Hey Guys,

    Is there a way for me to retrieve a related entity's record's guid in workflow?

    e.g: Workflow is on Entity A and I would like to retrieve / get the related entity (Entity B's GUID in the workflow)

    Relationship between entities:

    Type: Referential

    Entity A N : 1 Entity B

    Any ideas?


    Tuesday, June 7, 2011 12:21 PM


  • Not without creating custom activities as Workflows don't support showing the guids. This is a bit sad since the guids are usefull for assembling urls directly pointing to different objects in CRM, for instance pointing to an opportunity from a link in an email.

    I usually create workflow activities to convert an EntityReference (CRM 2011) to a GUID. Rather simple code but it is still a hassel since you cannot make a generic Input argument that accepts any entity (at least not in CRM 4.0). Hence you need one workflow activity per entity. If you want to use the guid in a url in an email, you will also need to create an activity that creates a link since this will otherwise not be possible.

    Hope it helps!

    Gustaf Westerlund, CEO and Chief Architect at CRM-Konsulterna in Sweden
    Blog: http://gustafwesterlund.blogspot.com
    Swedish Dyn CRM Forum: http://www.crmforum.se
    Tuesday, June 7, 2011 12:31 PM