开发者

SharePoint list updated column names not showing up through web services

I am using the GetListItems() method in Lists.asmx on a SharePoint 2007 server. I have noticed that when a column's name is changed in SharePoint, the web service continues to send back the column's original name instead of the new name.

I understand this is generally a good thing, but what can I do to get the service to send me the updated column name when that's what I want? Other than creating a new column开发者_StackOverflow, copying data, and deleting the original column?

Thanks.


Because GetListItems() uses internal names that do not change once the column is created. Check the SharePoint Internal name, Static name, Display name article for more details.

Use the Lists.GetList method to retrieve list schema - it contains both Name and DisplayName:

<Fields>
  <Field ColName="tp_ID" ReadOnly="TRUE" Type="Counter" Name="ID" PrimaryKey="TRUE" DisplayName="ID" FromBaseType="TRUE" />
<Fields>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜