当前情况:我正在使用 SharePoint Web 服务调用“ GetListItems ”从 SharePoint 列表中检索数据。
不幸的是,我有多个类型为 Person 的列。他们只显示人的名字,但我也想检索人的电子邮件地址。
我找到了这个:
<QueryOptions><ExpandUserField>TRUE</ExpandUserField></QueryOptions>
并在此处插入:
<?xml version="1.0" encoding="utf-8"?>
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
<soap12:Body>
<GetListItems xmlns="http://schemas.microsoft.com/sharepoint/soap/">
<listName>blahblah</listName>
<query>
<Query>
<Where>
<And>
<Eq>
<FieldRef Name='result' />
<Value Type="Text">Relationship declined</Value>
</Eq>
<Eq>
<FieldRef Name='Tracking_x0020_performed' />
<Value Type="Text">Open</Value>
</Eq>
</And>
</Where>
<QueryOptions><ExpandUserField>TRUE</ExpandUserField></QueryOptions>
</Query>
</query>
<viewFields>
<ViewFields xmlns=""> </ViewFields>
</viewFields>
<rowLimit>5000</rowLimit>
</GetListItems>
</soap12:Body>
</soap12:Envelope>
我没有得到任何关于我的响应 XML 中的人员类型字段的特定额外信息,只是 SP 列表中已经存在的字段。
那么如何从人员类型字段中检索电子邮件等?正如我所说,我只是得到他们的显示名称。