我编写了代码来设置BCS在Sharepoint 2013中使用服务器端代码公开的外部数据。以下是代码:
public void SetBusinessDataValue(object spItem,object spField, string value)
{
try
{
SPBusinessDataField businessDataField = spField as SPBusinessDataField;
SPListItem spListItem = spItem as SPListItem;
businessDataField.ParseAndSetValue(spListItem, value); //Set your value here
string fieldName = ((SPField)spField).Title;
spListItem[businessDataField.RelatedField] = spListItem.Fields[fieldName];
}
catch (Exception ex)
{
Logging.LogWriteLine("Error in method SetBusinessDataValue(). Failed to set the business data value", ex);
}
}效果很好。但是,我无法使用SharePoint客户端对象模型编写代码来在SharePoint 2013联机中设置外部数据。有人能帮忙解决我的问题吗?
发布于 2014-11-14 15:09:36
你在用沙箱解决方案吗?如果是,您可以在沙箱解决方案中编写相同的服务器代码。请!试试看。
https://stackoverflow.com/questions/26825541
复制相似问题