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 1 Discover the latest updates and new features to Dynamics 365 planned through September 2020
Release overview guides and videos Release Plan | Preview 2020 Release Wave 1 Timeline
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
We have a Custom Entity that we are generating via an app using the SDK. The entity has 2 different owners. OwnerId , Which is designed in the system to be referred to the Team and an pc_targetownerindividual which is intended to be the user. In the app I'm showing where the IndividualOwnerId is being mapped correctly but I actually don't see OwnerId being mapped at all. I believe this is resulting in the ownerId being defaulted to the User. However, when I added the field to be mapped it generates an error when trying to generate due to having an incorrect OwnerIdType. Which makes sense, it needs to know that it needs to be a 9 instead of an 8. However, I don't see anywhere to set the type code as the OwnerIdType isn't available in the Xrm.cs. I do see where 10018 is referenced but it is an entity type not an owner type. Does anyone have any information that might can help me understand what I'm doing wrong?
You have an error in code shown on the following screenshot:
You assign to OwnerId entity reference that doesn't contain user or team logical name and guid of account as far as I can see.
Fix it and error should go away.
My Apologies I should have eleborated that the SalesCenterId is in reference to the TeamId. It should be no different than the BranchId above it which maps to the team as well.
Then change mentioned line to
OwnerId = new EntityReference("team", AcctTaget.SalesCenterId)
This worked... I wonder how the Branch Id is any different being that references the same entity.
Branch Id is the custom field and there is only 1 option available so there is even no need to populate the schema name. For multi entity enabled fields like owner, customer or regarding it's required to provide proper schema name of the record selected in lookup.
Business Applications communities