web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Dynamics CRM 2016 perform query/look up in Workflow using a variable?

(0) ShareShare
ReportReport
Posted on by

Hi everyone,

I am trying to figure out how to do something, basically this is my scenario:

I have a Queue accepting e-mails

An e-mail comes in with a phone number in the subject

Queue routing creates a case titled the phone number {subject}

I need:

A workflow to fire on case creation and match that phone number to a contact's phone number and update a certain field in the record.

How would I go about doing something like this? I am unable to figure it out after an hour or two of messing with the functions, I'm using the latest and greatest 2016 Dynamics (Online instance).

I just want a WF to fire when a case is created, take the case's {title} and perform a match vs. a contact's {businessphone} and in the next step alter that matching contact's record by changing a field from 'no' to 'yes'.

Please tell me this can be done! and if so, how? If custom WF/plugin has to be made for this, can anyone point me in the way of a sample source or something that can assist? I am surprised this cannot be done naturally as CRM is so robust.

Thank you so much for reading!

Looking forward to a good response.

Regards 

*This post is locked for comments

I have the same question (0)
  • Community Member Profile Picture
    on at

    I think a plugin would be easier personally. This would allow you to retrieve the contact you are looking for and then update the field in question.

    The problem you are facing is that you cannot make a query from a workflow in CRM out of the box. You could implement a custom workflow activity https://msdn.microsoft.com/en-us/library/gg309745.aspx

    Basically what you would do is create  workflow activity that accepts a string (in this case a phone number) and returns a contact. Then you would be able to reference that contact in your workflow.

  • Community Member Profile Picture
    on at

    I wish I knew how to write it, it seems like a simple task. I've dabbled in VS and connected to CRM and was able to create a workflow activity but I am unsure what code to place in there to allow me to do this.

    I wish this was simpler.

  • Community Member Profile Picture
    on at

    Codeplex has custom 2016 WF tools:

    msdyncrmworkflowtools.codeplex.com/wikipage;referringTitle=Documentation

    This has a 'Query Values' step, but I am unsure if this would work. Apparently, you can set an entity to search and a search term filter; but playing with this I am unsure if I am doing it right. I'm wondering if anyone had success doing this with this solution.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
JS-09031509-0 Profile Picture

JS-09031509-0 3

#2
AS-17030037-0 Profile Picture

AS-17030037-0 2

#2
Mark Eckert Profile Picture

Mark Eckert 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans