Examples of code

  1. Here is Linq query I used to retrieve ActivityPointer

public List<ActivityPointer> GetRecentActivityForIncident(Guid incidentId)
{

this.tracingService.Trace(“Enter Method GetMostRecenActivityForIncident”);
using (OrganizationServiceContext crmContext = new OrganizationServiceContext(this.crmService))
{
var mostRecentWrappedTask = (from t in crmContext.CreateQuery<ActivityPointer>()
where
(t.RegardingObjectId != null && t.RegardingObjectId.Id.Equals(incidentId))
&& ((int) t.StateCode.Value == (int) TaskState.Completed)
orderby t.CreatedOn descending
select t);
return mostRecentWrappedTask.ToList();
}

}

How to access the latest technologies from Haskell

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: