Check out the latest features available in Dynamics 365 for Customer Engagement, including LinkedIn Connect, Voice of the Customer and Universal Resource Scheduling.
Dynamics 365 2019 release wave 2 plan Discover the latest updates to Dynamics 365.Release Plan | Weekly Deployment Notes
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 and Operations TechTalks | Customer Engagement TechTalks | Talent TechTalks
I have a Custom entity called "CorpArticle" with the field "owininguser" which refers to "SystemUser"
How can I use LINQ to get the get the SystemUser entity using the "owninguser"?
Entity CorpArticle = new Entity("corp_article");
var articles = (from a in svcContext.CreateQuery(CorpArticle.LogicalName)
foreach (var a in articles)
//THIS DOES NOT WORK var user = svcContext.SystemUserSet.Where(u => u.Equals(a.Attributes["owninguser"])).First(); }
this should give you an idea
EntityReference owner = (EntityReference)a["owninguser"];
var user = svcContext.SystemUserSet.Where(t => t.Id == owner.Id).First();
I didn't test but should work, if doesn't work, you can play around to make it working. I don't know why you use owninguser but normally ownerid field is user (but can be a team as well)
That is exacly what I'm was looking for. Thnx.
Business Applications communities