Personalized Community is here!
Quickly customize your community to find the content you seek.
Choose your path Increase your proficiency with the Dynamics 365 applications that you already use and learn more about the apps that interest you. Up your game with a learning path tailored to today's Dynamics 365 masterminds and designed to prepare you for industry-recognized Microsoft certifications.
Visit Microsoft Learn
2020 Release Wave 2Discover the latest updates and new features to Dynamics 365 planned through March 2021.
Release overview guides and videos Release Plan | Preview 2020 Release Wave 2 TimelineWatch the 2020 Release Wave 1 virtual launch event
Ace your Dynamics 365 deployment with packaged services delivered by expert consultants. | Explore service offerings
Connect with the ISV success team on the latest roadmap, developer tool for AppSource certification, and ISV community engagements | ISV self-service portal
The FastTrack program is designed to help you accelerate your Dynamics 365 deployment with confidence.
FastTrack Program | Finance TechTalks | Customer Engagement TechTalks | Upcoming TechTalks
Hello I am trying to create a workflow that first:
1. Extracts data from CosmosDB, using a query
2. Looping over the results
3. Pushing the results data into CRM
Once this data is created in CRM, CRM automatically generates an ID for each record. How can I then:
4. Return the newly generated ID back to the original CosmosDB container in which it was pulled from?
I have started on this and these are my questions:
Does this first part look correct in what I am doing? I must use this SQL query for this:
a. I am simply telling the Logic App to extract data from a particular container inside CosmosDB
b. Then I would like to loop over the results I just obtained, and push this to CRM
c. My dilemma is: Once data is pushed to CRM, CRM then automatically generates an ID for each record that is uploaded. How would I then return the updated ID to cosmos? I am not sure how to construct this in LogicApps and have been researching examples of this.
Any help is greatly appreciated.
Regarding the Record Creation in Dynamics CRM and take the ID from it you can use the CDS Create Record action.
This action after creating a Record returns the ID from it through 3 differentes means:
- ItemInternalId: "<guid>";
- @odata.id : "https://<orgname>.crm<region>.dynamics.com/api/data/v9.1/<entity>(<guid>);
- Entity Primary Key (e.g. for Account it would be AccountId)
You can then extract one of these values, ideally the first option, through Dynamic Content and insert it in Cosmos.
As an example I've created an Account and extracted the ItemInternalId through the expression body('<actionname>')['iteminternalid']:
In this case I'm using compose but you could directly use the expression in the Cosmos DB action.
Hope this helps!
Thank you Felipe, I am reading the documents that you sent. Very helpful!
Business Applications communities