**Background:**
I have been working on this the past day and will appreciate any insight. I am creating a Logic App that automates the transfer of data from CosmosDB to CRM. My dilemma is that in creating my logic app, the fields are a 'lookup' field. I am unsure of where to find the guids for these lookup fields.
This is what I have done so far:
**Dilemma:**
I am trying to find the record ID or GUID for the 'Feature Category' lookup field. How exactly do I do this? I researched where someone mentions to search within CosmosDB,how would I do this?
There are other articles that state you have to List Records' within the Logic App? However, I am not fully understanding this.
Any insight is greatly appreciated.
Hi,
I can see in your image. Check below I have highlighted in red color.
Also, for my text values, you are saying that in order for me to return the GUID, I would have to perform the operation for every distinct text. Is there an efficient way to even do this?
You can create new text field(Single line of text) and directly map the data from cosmos to this newly created field. This does not require lookup as this is text field. Now ask CRM developer to fill the lookup field based on text value using plugin.
Thank you @Bipin
So I am using this:, a sandbox environment. Where can I find all of your screenshots? Can I find this within my sandbox?
Also, for my text values, you are saying that in order for me to return the GUID, I would have to perform the operation for every distinct text. Is there an efficient way to even do this?
Hi,
Does this mean that the CRM does not have the ID for this lookup?
Yes, This means we don't have any record in CRM with the filter criteria specified.
also, for this text field, below, there are over 3000 distinct texts, similar to the ASME: Azure stack. Does this mean I have to perform the list record for every single text?
Every time when you are creating record in Dynamics CRM, you would required GUID so yes you will have to perform this operation.
Also, where do I find the name for the search query? for example for the Features Category, I guessed at ems_name. But how do I know this for sure?
Can you go to advanced find see below image highlighted section in red color to open Advanced find from CRM dynamics Home page
Once advanced find open, select feature category in look for then click on result to see how many records are already present in crm for this entity. Once you find the records check the column which has same name as the value which you are getting from cosmos. Now go back and add filter condition on same field then click on download fetxh xml.
Replace Account with feature category - then click result see highlighted section in red color
once you get records, check field to be used and go back then add filter same as account name
Ok @Bipin you so much. A few questions I have
I went ahead and did this to locate my GUID. The logicApp ran well but the output is [] an empty array (see below)
:
Does this mean that the CRM does not have the ID for this lookup?
also, for this text field, below, there are over 3000 distinct texts, similar to the ASME: Azure stack. Does this mean I have to perform the list record for every single text?
Also, where do I find the name for the search query? for example for the Features Category, I guessed at ems_name. But how do I know this for sure?
Finally, once I located the GUID, how do I place this in the logic app?
Thank you Bipin!
Hi,
Did you follow my answer which I suggested on your other forum question?
If not please see below my answer.
1. First Check if value for feature category which you are getting from cosmos DB is present in crm. To check this you can use Advanced find in Dynamics CRM and look for feature category then add filter Name equals Value you are getting from Cosmos DB. click on result, If value is present in crm as suggested use list records to get record ID. If value is not present then ask your project lead how do we handle this?
2. If value is not present in CRM, Ask you project lead this question - "Do we need to create feature category record first and then use newly created record ID to set the lookup field on feature"
I don't think this filter criteria and entity name is correct.
Navigate to settings->Customization->Customize the system->Entity>Feature->Fields->Open Feature group fields->Check Target Record Type
Now go back to list record in logic apps change the entity name to same as Target record type in field property.
For filter criteria you should install below rest builder solution on your crm instance/you can also use fetchxml builder from xrm toolbox to build the filter criteria syntax.
github.com/.../releases
Download managed solution and install in your crm instance.
build the filter criteria in rest builder and copy same in logic apps
I think your filter criteria should be new_name eq 'Azure Stack' --Replace new_ with your prefix
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 290,900 Super User 2024 Season 2
Martin Dráb 229,275 Most Valuable Professional
nmaenpaa 101,156