1


I have developed in Visual Studio solution that define custom field type for SPList. Everything works fine. After deploy I was able to add my custom column into SPList. SP has created field ID (Guid).

I have noticed that some SP fields has always the same guid, for example blog body: 7662cd2c-f069-4dba-9e35-082cf976e170. It's easy to find column for SPListItem id you know ID.

Question: Can I define my custom Guid that will be used by SP to set field id in data base?

1 Answer 1

1

The reason the Guid is same for the 'blog body' is because its a site column. Site column is a resuable column definition (based on a type), that can be reused in multiple lists.

If you create a column in a list, that column is local to that list and the Guid will be different from all other columns. If you would like to reuse a certain column (usualy a part of content type), you would create a site column and add the site column to the list/library. In this case no mater where you use the site column in the target site collection, the Guid will be the same.

Note that you cannot set a guid, when creating a site column using UI. But you can control the guid if you are deploying it via code. Look at this for more info.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.