2017-07-25 62 views
0
SPClientContext.Credentials = new SharePointOnlineCredentials(username, securePassword); 

//https://msdn.microsoft.com/en-us/library/office/ee534956(v=office.14).aspx 
Web SPWeb = SPClientContext.Web; 
List SPlist_CSV = SPWeb.Lists.GetByTitle("Supplier Master List"); 

View SPview_CSV = SPlist_CSV.Views.GetByTitle("_Data Pending Export to CSV");//oracle export field 

SPClientContext.Load(SPview_CSV); 
SPClientContext.ExecuteQuery(); 

CamlQuery query = new CamlQuery(); 
query.ViewXml = SPview_CSV.ViewQuery; 

ListItemCollection items = SPlist_CSV.GetItems(query); 
SPClientContext.Load(items); 
SPClientContext.ExecuteQuery(); 

foreach (var item in items) 
{ 
    //some field/item missing? 
} 

嗨,我使用上述代碼從SharePoint聯機檢索數據。起初,它工作正常。C#CSOM SPView ListItemCollection沒有更新後,我在SP視圖中添加新字段

但是,當我在SharePoint網上添加新列到視圖_Data Pending Export to CSV時,發現新添加的字段丟失。任何想法?

回答

0

好的。我發現了其他問題,查找字段超出限制。我所做的解決方法是將查閱字段更改爲單行文本字段,然後使用工作流填充新的單行文本字段。

相關問題