我通過Sitecore Web服務即時創建項目。到目前爲止,我可以從這個函數來創建項目:通過Sitecore Web服務訪問項目字段
AddFromTemplate
而且我也試過此鏈接:http://blog.hansmelis.be/2012/05/29/sitecore-web-service-pitfalls/
但我發現很難進入的領域。到目前爲止,這裏是我的代碼:
public void CreateItemInSitecore(string getDayGuid, Oracle.DataAccess.Client.OracleDataReader reader)
{
if (getDayGuid != null)
{
var sitecoreService = new EverBankCMS.VisualSitecoreService();
var addItem = sitecoreService.AddFromTemplate(getDayGuid, templateIdRTT, "Testing", database, myCred);
var getChildren = sitecoreService.GetChildren(getDayGuid, database, myCred);
for (int i = 0; i < getChildren.ChildNodes.Count; i++)
{
if (getChildren.ChildNodes[i].InnerText.ToString() == "Testing")
{
var getItem = sitecoreService.GetItemFields(getChildren.ChildNodes[i].Attributes[0].Value, "en", "1", true, database, myCred);
string p = getChildren.ChildNodes[i].Attributes[0].Value;
}
}
}
}
因此,大家可以看到我創建一個項目,我想訪問字段該項目。 我以爲GetItemFields會給我一些價值,但很難找到它。任何線索?