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

How to get latest data from CRM using CRM SDK 2015 OrganizationServiceContext linq query?

$
0
0

Hi,

We're using CRM 2015 early bind to query and update CRM from a web service, we're using linq query to retrieve data, we've used the SDK generated objects from Microsoft.Xrm.Client.CrmOrganizationServiceContext  like: 


public System.Linq.IQueryable<Crm.Context.Account> AccountSet

then we're using 

var myAccount = _context.AccountSet.FirstOrDefault(p => p.myCustomId == myCustomValue);

The problem is myAccount doesn't have the latest data updated by a separated event service(this event service is using CRM SDK to do the updates to CRM), like when event service has updated 

myAccount.mySecondCustomId = 9000000001, but when we use the linq query to retrieve the entity, we're getting myAccount.mySecondCustomId as null which is the old value.

Is there a way we can force the linq query to get the latest data from CRM?

Your help is great appreciated.

Regards,

Ping


Viewing all articles
Browse latest Browse all 82002

Latest Images

Trending Articles



Latest Images