2016-10-26 18 views
1

我在Sitefinity中有一個自定義模塊,其中一個字段是分類。發佈Sitefinity模塊的分類到oData Web服務失敗

我想發佈一個JSON對象來使用像http://mywebsite.com/api/default/customModule

我的帖子體的路線Sitefinity 9 Web服務看起來是這樣的:

{ 
"Field1": "sample string 1", 
"Field2": "sample string 2", 
"Field3": "sample string 3", 
"Category": [ 
    "6bd9a66e-0e6e-4255-b628-89b86cde6eae" 
] 
} 

這是符合sfhelp文檔如果我刪除「類別」字段,一切正常。

目前我得到的 Unable to cast object of type 'System.Collections.Generic.List'1[System.Guid]' to type 'Telerik.OpenAccess.TrackedList'1[System.Guid]'

回答

1

錯誤看起來像場是單一的,例如您只能選擇一個類別,因此請求不應發送一組類別:

{ 

"Field1": "sample string 1", 
"Field2": "sample string 2", 
"Field3": "sample string 3", 
"Category": "6bd9a66e-0e6e-4255-b628-89b86cde6eae" 
}