开发者

Using Sharepoint webservices to get the ID/GUID of a custom field

开发者 https://www.devze.com 2023-01-30 03:30 出处:网络
I am trying to get the ID/G开发者_如何学JAVAUID of a custom column field from one of my Document libraries using web services.How does one go about doing this in C#?You\'ll need to get the GUID via th

I am trying to get the ID/G开发者_如何学JAVAUID of a custom column field from one of my Document libraries using web services. How does one go about doing this in C#?


You'll need to get the GUID via the SiteData webservice, the Webs webserivce doesn't retrive the ID....

http://social.msdn.microsoft.com/Forums/en-US/sharepointdevelopment/thread/3dd5871c-b52e-45c9-8ab2-9b9be092dede/


Ola!

Try this in C#

SPWeb web = SPContext.Current.Web as SPWeb;
Guid id = web.AvailableContentTypes["ContentTypeName"].Fields["FieldName"].Id;

Regards,

Pedro

0

精彩评论

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

关注公众号