1

I am trying to get the ID/GUID of a custom column field from one of my Document libraries using web services. How does one go about doing this in C#?

Adam Link
  • 2,783
  • 4
  • 30
  • 44
Zilor
  • 101
  • 1
  • 11

2 Answers2

0

Ola!

Try this in C#

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

Regards,

Pedro

Pedro
  • 52
  • 3
0

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/

tfforums
  • 58
  • 6
  • an alternative to this is also to get the "WebId" attribute from one of the nodes returned by Lists.getLists() – tfforums Jul 11 '12 at 02:28