Using the CRM SDK to retrieve multiple records in C#.net

December 24, 2008 – 4:57 pm

Upon first using the CRM sdk webservices a couple of years ago I realize that it is now a staple of the work that I do. It makes customizations and communications with other business areas efficient and easy to develop.

Looking back I remember one of the first hurdles I had to over come was to develop and understanding of the businessEntityCollections, the query expression object and all the other components of a retrieveMultiple Method. Having a background in SQL helped a great deal in understanding this system and I will use an example of a SQL query to get us started. Read the rest of this entry »

DataGrids, DataTables and Hyperlinks oh my!

December 24, 2008 – 9:21 am

Problem: Data must be returned in a datatable and then bound into a gridview. I have a hyperlink I must also add into the gridview

Solution: Use a hyplerlinkcolumn control in a datagrid instead of a gridview.

The problem that I solved is that I wanted to disable certain users in Microsoft Dynamics CRM (3.0) from the ability to have full access to a specified entity.

The users would access this information from a parent entity (one to many) so to limit the information that they could view I shut their access off completely and then created a custom tab on the core record.

In C# I then used the CRM SDK to retrieve multiple and stored the information within a datatable.

The datatable is the returned and each column is bound to a boundfield control which is then associated with a datagrid.

note: you cannot render a hyperlink directly from a datatable so you must create either a gridview or datagrid for .net to display

After the page is complete a tab is set to pass parameters and the published in the crm using the admin interface. Read the rest of this entry »