Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

Can I query non-related entities in a custom workflow?

Posted on by

I am creating a custom workflow activity on a leads entity.  Is there a way to query a non- related entity within the workflow activity?  Any help would be appreciated.

Thanks!

*This post is locked for comments

  • Suggested answer
    Aric Levin Profile Picture
    Aric Levin 30,188 on at
    RE: Can I query non-related entities in a custom workflow?

    You can use service.Retrieve if you know the Guid you are looking for, or you can use service.RetrieveMultiple with either QueryExpression or QueryByAttribute.

    You can also use Linq queries if you want.

    Anything you need can be accomodated from within the code (as long as you don't access external resources, where there are some limitations).

    Hope this helps.

  • mroot Profile Picture
    mroot on at
    RE: Can I query non-related entities in a custom workflow?

    Thanks, in order to query any entity I want, I need to use the QueryExpression class?

  • Suggested answer
    Aric Levin Profile Picture
    Aric Levin 30,188 on at
    RE: Can I query non-related entities in a custom workflow?

    If you are talking about a Custom Workflow, you can do anything you want. It is developed using Custom Code, and if you want to query a particular entity, there is no reason why you shouldn't.

    Hope this helps.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,269 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,198 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans