Skip to main content

Notifications

Microsoft Dynamics 365 | Integration, Dataverse...
Unanswered

Returned Mapped XRM Model from LINQ Query to D365 Have Some Empty Fields

Posted on by 145

Hi Community ! 

I have a small console application that queries a custom entity on my trial CRM instance. Furthermore , i generated XRM for my instance and i'm using it. Custom entity is called "Account Type" and its schema name is "new_accounttype" , when i execute a simple LINQ query to retrieve the records in it i face an issue in that some of the returned fields are null . Here is my query :

var serviceContext = new XrmServiceContext(orgService);

var accountType = (from e in serviceContext.new_accounttypeSet
                                select e
                               ).ToList();
But if i use Retrieve from the organization service , all the fields returned correctly:
var accountType = orgService.Retrieve(new_accounttype.EntityLogicalName , /*Specific Guid*/ , new ColumnSet(true)); // this works fine 
This screenshot is a sample record in the entity:
pastedimage1580720302650v1.png
for example ,  capacity field is returned correctly but MaxPoints is null.
Your help is much appreciated !
  • Khaled Rimawi Profile Picture
    Khaled Rimawi 145 on at
    RE: Returned Mapped XRM Model from LINQ Query to D365 Have Some Empty Fields

    I did

  • erhan.keskin Profile Picture
    erhan.keskin 2,247 on at
    RE: Returned Mapped XRM Model from LINQ Query to D365 Have Some Empty Fields

    Hi,

    You might need to update early bound entity classes.

    Regards,

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.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,240 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,149 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans