Notifications
Announcements
No record found.
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?
Hello,
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.
Good luck.
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.
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.
As AI tools become more common, we’re introducing a Responsible AI Use…
We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Tom_Gioielli 137 Super User 2025 Season 2
#ManoVerse 57
Jimmy Passeti 50 Most Valuable Professional