Quantcast
Channel: Microsoft Dynamics CRM Forum - Recent Threads
Viewing all articles
Browse latest Browse all 79901

Fetching records with EarlyBoundGenerator doesn't fetch all the information

$
0
0

We are using EarlyBoundGenerator to create a ServiceContext that we then can use Linq arguments to query Dynamics.

But we have been experiencing some problems, that from time to time it won't fetch all the fields, or rather some fields won't be populated with the data from Dynamics.

The following code:

var ac = (from acc in commonContext.Context.AccountSet
where acc.Id == commonContext.AccountId
select acc).FirstOrDefault();

When I then do some tracing to see what we get out it doesn't give me the data that is in Dynamics.

    commonContext.TracingService.Trace($"ac: {ac?.Id}, BusinessUnit: {businessUnitId}, Name: {ac?.Name}, Number: {ac?.zync_customernumber}, Country2: {ac?.zync_Address2Country?.Value}, Country1: {ac?.zync_Address1Country?.Value}");
    commonContext.TracingService.Trace($"phone: {ac?.Telephone1}, Email: {ac?.EMailAddress1}, Org: {ac?.zync_Organizationnumber}, Einvoice: {ac?.zync_einvoiceemail}");

In the above we get the Id and BusinessUnitId, but Name and Number does not get populated despite them having data in Dynamics.

Anyone having a similar problem and knows how to get around this problem. Right now we will either use a fetch query or use the organizationservice instead. 


Viewing all articles
Browse latest Browse all 79901

Trending Articles