使用C#从ASP.NET升级到CRM 2011 [英] Upadating from ASP.NET using C# to CRM 2011

查看:73
本文介绍了使用C#从ASP.NET升级到CRM 2011的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好

我正在尝试更新CRM 2011中的更改​​:

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);


但是最后一行给我这个错误:不正确的属性值类型System.String我检查了每个值,但似乎找不到问题.


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.

推荐答案

I有同样的问题.您正在传递一些与CRM中的system.string不同的数据.看看每个领域.尝试用一个字段创建t15_asset,然后一个一个地添加其他字段.
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.


这篇关于使用C#从ASP.NET升级到CRM 2011的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆