Question

I'm creating a plugin for CRM 2011, I have referenced the Microsoft.Xrm.Sdk.dll and I'm using other objects like "EntityReference" and others with no problem. However, I cannot use "ColumnSet", I'm getting an error "missing assembly or reference".

I couldn't find online what indicates that ColumnSet cannot be used in Plugins, so do you have an idea what's going on ?

EDIT: Same thing for QueryExpression, I cannot use it

Was it helpful?

Solution

You need to either have

using Microsoft.Xrm.Sdk.Query;

in the header of the file or put that into every call to QueryExpression and ColumnSet

Microsoft.Xrm.Sdk.Query.QueryExpression qe = new Microsoft.Xrm.Sdk.Query.QueryExpression();

OTHER TIPS

The reason is nothing you have to add namespaces. Because namespaces contains classes. and also if you don't know namespaces means just type class as and click ctrl+. namespaces will come automatically. see the below image for your referenceSample for your reference

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top