Truemag

  • Categories
    • Tips And Tricks
    • Internet
    • PHP
    • Javascript
    • CSharp
    • SQL Server
    • Linux
  • Lastest Videos
  • Our Demos
  • About
  • Contact
  • Home
  • Write With Us
  • Job Request
Home Problem Issue Error Property or indexer ‘Microsoft.Crm.Sdk.Query.ColumnSet.Attributes’ cannot be assigned to – it is read only

Property or indexer ‘Microsoft.Crm.Sdk.Query.ColumnSet.Attributes’ cannot be assigned to – it is read only

I’m using Microsoft Dynamics CRM 4.0 SDK for my project. When I play with CrmService.Retrieve Method and apply a example from the SDK, it stopped me at:

 
// Create the column set object that indicates the properties to be retrieved.
ColumnSet cols = new ColumnSet();
 
// Set the properties of the column set.
cols.Attributes = new string [] {"fullname"};

// Create the column set object that indicates the properties to be retrieved. ColumnSet cols = new ColumnSet(); // Set the properties of the column set. cols.Attributes = new string [] {"fullname"};

And raised an error message like this:

 
Error	1	Property or indexer 'Microsoft.Crm.Sdk.Query.ColumnSet.Attributes' cannot be assigned to -- it is read only	C:\Users\user\Documents\Visual Studio 2008\WebSites\WebSite2\Default.aspx.cs	27	9	C:\...\WebSite2\

Error 1 Property or indexer 'Microsoft.Crm.Sdk.Query.ColumnSet.Attributes' cannot be assigned to -- it is read only C:\Users\user\Documents\Visual Studio 2008\WebSites\WebSite2\Default.aspx.cs 27 9 C:\...\WebSite2\

I’m not quite sure what the problem was but I need to replace that with following code:

 
ColumnSet cols = new ColumnSet(new string[] { "fullname" });

ColumnSet cols = new ColumnSet(new string[] { "fullname" });

Or use AllColumns to retrieve all attributes:

 
AllColumns ac = new AllColumns();

AllColumns ac = new AllColumns();

I worked for me, hope it also work for you 🙂

Mar 21, 2011Hoan Huynh
PHP Error Log File LocationProperty or indexer 'Microsoft.Crm.Sdk.Query.FilterExpression.Conditions' cannot be assigned to - it is read only
You Might Also Like:
  • Property or indexer ‘Microsoft.Crm.Sdk.Query.FilterExpression.Conditions’ cannot be assigned to – it is read only
  • Facebook Like Button And Recommend Button With fb:like, iframe and html5
  • Retrieve Account With Microsoft Dynamics CRM Web Services By C#
  • How To Track Website With Multiple Google Analytisc Accounts
  • Create Account With Microsoft Dynamics CRM Web Services By C#
  • Facebook Load User Profile Via Graph API And FQL Query
  • Capture And Display Execution Time Of SQL Query In SQL Server
  • JavaScript Get Radio Button Value
  • Get Or Read AppSettings Item Value From The Web.Config File
  • PHP Connect To MySQL Read Data And Export XML Format
Hoan Huynh

Hoan Huynh is the founder and head of 4rapiddev.com. Reach him at [email protected]

11 years ago Problem Issue ErrorAllColumns, ColumnSet, CrmService.Retrieve, Microsoft Dynamics CRM, SDK290
0
GooglePlus
0
Facebook
0
Twitter
0
Digg
0
Delicious
0
Stumbleupon
0
Linkedin
0
Pinterest
Most Viewed
PHP Download Image Or File From URL
24,554 views
Notepad Plus Plus Compare Plugin
How To Install Compare Text Plugin In Notepad Plus Plus
21,892 views
Microsoft SQL Server 2008 Attach Remove Log
Delete, Shrink, Eliminate Transaction Log .LDF File
17,745 views
JQuery Allow only numeric characters or only alphabet characters in textbox
15,069 views
C# Read Json From URL And Parse/Deserialize Json
11,802 views
4 Rapid Development is a central page that is targeted at newbie and professional programmers, database administrators, system admin, web masters and bloggers.
Recent Posts
  • Things to Learn about Installingderm Loan Type S
  • Online Photo Editor – Free Photoediting Software
  • A Guide to Finding the Best Paper Sellers
  • Photoediting in Home Isn’t Hard to Do!

  • Free Photo Editor Online
Categories
  • CSharp (45)
  • Facebook Graph API (19)
  • Google API (7)
  • Internet (87)
  • iPhone XCode (8)
  • Javascript (35)
  • Linux (27)
  • MySQL (16)
  • PHP (84)
  • Problem Issue Error (29)
  • Resources (32)
  • SQL Server (25)
  • Timeline (5)
  • Tips And Tricks (141)
  • Uncategorized (647)
Recommended
  • Custom Software Development Company
  • Online Useful Tools
  • Premium Themes
  • VPS
2014 © 4 Rapid Development