Dynamic CRM objects of 2011
I am very new to Dynamics CRM and am starting to learn how to develop custom applications that use CRM web services.
I have a Dynamics CRM SDK and I started with a Lab that Microsoft provides, so I now have a small test application that can display the organizations of the user who is logged in.
This test application can create new account records, but what I'm actually interested in is access to an incremented entity.
I have the following
Entity location1 = new Entity("account");
location1["name"] = LocationName.Text;
location1.Id = this.OrgService.Create(location1);
MessageBox.Show("New Location ID is " + location1.Id.ToString());
But I really want to do something in line
Entity location1 = new Entity("incedent");
location1["title"] = LocationName.Text;
location1.Id = this.OrgService.Create(location1);
MessageBox.Show("New Location ID is " + location1.Id.ToString());
But I get an exception stating that there is no such entity, but when I enter CRM via IE, I can create an event with no problem.
I'm guessing my approach is wrong, so I hope someone can point me in the right direction for using these WCF services and a list of available entities that I can create that way and how to create a new / incedent entity.
thank
source to share
Well, you have to write the entity name like this: "incident" not "incedent"
and after you have the Guid of the entry, you can access it through the organization
do the following:
// To retrieve all columns from contact entity for example
ColumnSet cols = new ColumnSet({ Allcolumns = true });
Entity retrievedIncident = OrgService.Retrieve("contact", id, cols);
// To retrieve specific columns
ColumnSet cols = new ColumnSet(new String[] { "name", "address1_postalcode", " lastusedincampaign", "versionnumber" });
Entity retrievedIncident = OrgService.Retrieve("contact", id, cols);
source to share