Click here to Skip to main content
15,887,485 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi Guys

I am trying to update changes in CRM 2011:
Entity upEntity = new Entity("t15_asset");
string c = Request.QueryString["id"].ToString();

upEntity["t15_assetid"] = new Guid(c);

upEntity["t15_item"] = ddlItem.SelectedItem.Text;
upEntity["t15_make"] = ddlMake.SelectedItem.Text;
upEntity["t15_assetowner"] = ddlOwnership.SelectedItem.Text ;
upEntity["t15_model"] = txtModel.Text;
upEntity["t15_serialnumber"] = txtSerialNumber.Text;
upEntity["t15_servicetag"] = txtServiceTag.Text;
upEntity["t15_comnumber"] = getOwnership;
                                   
Asset asset = new Asset(CrmHelper.GetOrganizationService());
            
asset.updateAsset(upEntity);

But the last line gives me this error: Incorrect attribute value type System.String I have checked every value but can't seem to find the problem.
Posted
Updated 15-Mar-11 20:09pm
v2
Comments
JF2015 16-Mar-11 2:11am    
Edited to add code formatting.

1 solution

I got the same problem. You are passing some data that are different of system.string in CRM. Look each field. Try to create the t15_asset with one fields, and add other fields one by one.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900