gustafwesterlund: Formating Web API query for getting VoC Survey questions
Working with a Flow to do some text analysis and sentiment analysis on Voice of the customer responses.
The trick, as the payment model is per run, is to trigger it per Survey Response, and not Question Response. Hence the logic has to loop through all the question responses.
The way you create a filter in Flow for the query is to use Odata filters. However, I found that these were a casing nightmare, which those of you who have worked with more, probably also have noticed.
After troubleshooting a lot with different queries in the browser I finally found that the following actually worked. Note that you will have t change the guid to your own.
The tricky part, as you can see, is that the first part of the lookup attribute, is defined in camel-case and the one in the related entity (Survey Response) in lower case.
The part you need in the Flow is the last part, but it is useful to test it directly in the browser to make sure you get the syntax correct.
Its the filter part of the query that you are to enter into the "Filter query" field, and make sure to make it dynamic. :)
And this is how it looks in Dynamics 365 CE if you check out the fields. I like to look at them in the list view as I can see the schema name there, which isn't visible in the Form.
msdyn_SurveyResponseId Lookup from the Question Response Entity. As you can see it seems to be using the Schema name above.
This is the primary field Survey Response. Do note the subtle difference between the fields, that Id is spellt with a capital "I" in the Schema name. Based on the information above, it hence seems to be using "Name" to indicate the field.
Hence based on the above, the supposition would be that the syntax is /
I then did a query to business Unit and I was very surprised to find that it was rather inconsistent and looked like this:
with just the query that would be
parentbusinessunitid/businessunitid eq null
Let's have a look at the fields in Dynamics:
The Parent Business Unit Lookup in Business Unit (Self Referential). Note that the Schema name is Pascal Case.
key field, businessunitid in Business Unit
And as you can see, if we were to follow the syntax set by the example above, this should be:
However, that didn't seem to work, and as a pragmatist, I have to conclude, somewhat sad, that this doesn't seem to be very consistent.
My recommendation is hence when working with this:
And if you know Swedish, make sure you check out my colleague Martin Burmans article on Flow as well. Not sure how well it turns out in translation. https://www.crmkonsulterna.se/flow-i-medvind/
MVP, Founder and Principal Consultant at CRM-konsulterna AB
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору.
|dynamicsnavax: Hybrid connection - Web Api App for AX 2012 to Azure-part 4||Blog bot||DAX Blogs||0||14.09.2017 13:11|
|Microsoft Dynamics CRM Team Blog: Onboarding to Web API for Dynamics CRM 2016 from Web API Preview||Blog bot||Dynamics CRM: Blogs||0||17.02.2016 05:25|
|crminthefield: Dynamics CRM 2011 SDK Query Limitations by API||Blog bot||Dynamics CRM: Blogs||0||14.01.2013 20:11|
|Microsoft Dynamics CRM Team Blog: List Web Part for Microsoft Dynamics CRM 4.0: Understanding Connections||Blog bot||Dynamics CRM: Blogs||0||20.01.2009 02:07|
|Inside Dynamics AX 4.0: The Web Framework||Blog bot||DAX Blogs||0||25.10.2007 03:04|
|Опции темы||Поиск в этой теме|