0
我已經使用服務器端代碼編寫代碼,以便在Sharepoint 2013中設置由BCS公開的外部數據。這裏是代碼:如何在Sharepoint 2013 Online中設置Business Connectivity Service(BCS)公開的外部數據?
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 Client Object模型在SharePoint 2013 Online中設置外部數據。有人可以幫助解決我的問題嗎?