2017-08-17 16 views
0

listdata.svcを使用してRESTサービスのエンドポイントを経由してSharePoint 2010のリストにアクセス:Sharepoint 2010 REST Listサービスに人物フィールドがありませんか?

.../_ vti_bin/listdata.svc/ExpenseBudgetSubmissionRequests

応答がで定義されている人物/ユーザフィールドが欠落していますリスト:

<?xml version="1.0" encoding="utf-8" standalone="yes"?> 
<feed xml:base=".../_vti_bin/listdata.svc/" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" xmlns="http://www.w3.org/2005/Atom"> 
    <title type="text">ExpenseBudgetSubmissionRequests</title> 
    <id>.../_vti_bin/listdata.svc/ExpenseBudgetSubmissionRequests/</id> 
    <updated>2017-08-17T08:03:15Z</updated> 
    <link rel="self" title="ExpenseBudgetSubmissionRequests" href="ExpenseBudgetSubmissionRequests" /> 
    <entry m:etag="W/&quot;1&quot;"> 
    <id>.../_vti_bin/listdata.svc/ExpenseBudgetSubmissionRequests(1)</id> 
    <title type="text">Department1</title> 
    <updated>2017-08-16T11:20:29+01:00</updated> 
    <author> 
     <name /> 
    </author> 
    <link rel="edit" title="ExpenseBudgetSubmissionRequestsItem" href="ExpenseBudgetSubmissionRequests(1)" /> 
    <link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Status" type="application/atom+xml;type=entry" title="Status" href="ExpenseBudgetSubmissionRequests(1)/Status" /> 
    <link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/CreatedBy" type="application/atom+xml;type=entry" title="CreatedBy" href="ExpenseBudgetSubmissionRequests(1)/CreatedBy" /> 
    <link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/ModifiedBy" type="application/atom+xml;type=entry" title="ModifiedBy" href="ExpenseBudgetSubmissionRequests(1)/ModifiedBy" /> 
    <link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Attachments" type="application/atom+xml;type=feed" title="Attachments" href="ExpenseBudgetSubmissionRequests(1)/Attachments" /> 
    <category term="Microsoft.SharePoint.DataService.ExpenseBudgetSubmissionRequestsItem" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" /> 
    <content type="application/xml"> 
     <m:properties> 
     <d:ContentTypeID>0x0100F434AF171BE4B04F8C760EB990D765EF</d:ContentTypeID> 
     <d:Department>Department1</d:Department> 
     <d:CostCentre>CostCentre1</d:CostCentre> 
     <d:FinancialYear m:type="Edm.Double">2017</d:FinancialYear> 
     <d:StatusValue>Unsubmitted</d:StatusValue> 
     <d:Id m:type="Edm.Int32">1</d:Id> 
     <d:ContentType>Item</d:ContentType> 
     <d:Modified m:type="Edm.DateTime">2017-08-16T11:20:29</d:Modified> 
     <d:Created m:type="Edm.DateTime">2017-08-16T11:20:29</d:Created> 
     <d:CreatedById m:type="Edm.Int32">2</d:CreatedById> 
     <d:ModifiedById m:type="Edm.Int32">2</d:ModifiedById> 
     <d:Owshiddenversion m:type="Edm.Int32">1</d:Owshiddenversion> 
     <d:Version>1.0</d:Version> 
     <d:Path>.../Lists/Expense Budget Submission Requests</d:Path> 
     </m:properties> 
    </content> 
    </entry> 
</feed> 

は$ exapndを選び、$パラメータを通じてしかし、誰成功した人のフィールドを指定しようとしました。あなたはどのように人のフィールドにアクセスしますか?このブログエントリへ

答えて

0

クレジット:List属性がのSchema.xmlから欠落している https://thesharepointdive.wordpress.com/2014/09/17/user-field-does-not-appear-sharepoint-2010-rest-services/

、しかし右アクセスすることなく、私が直接、スキーマのXMLファイルを編集できないようです。

解決方法:リスト設定で、ユーザーグループから選択する個人フィールドを設定します。後でいつでもすべてのユーザーに戻すことができますが、このアクションでは、リストschema.xmlのフィールドに対してList属性が作成されます。

ユーザーフィールドがREST応答に追加されました。

Click here for list settings screen shot

関連する問題