R – add column that browses on a sharepoint content type

sharepoint

Im creating a new content type in sharepoint.

I am trying to add a new column/field that will let the user browse for an "asset" eg picture or video that exists in the sharepoint site.

how do i add a column that gives the user the ability to browse.

thanks

Best Answer

You will want to create a custom field and provide your own browse UI in the rendering control template (see below). Its fairly straightforward to get started, but you need to be aware that there are multiple moving parts:

  1. The field type/rendering control - this is an object that encapsulates the field definition. It is responsible for understanding how to render the field at design time (when its added to a list), at run time (when its being filled out in a form, or viewed on a list view page) and the type of value the field contains.
  2. The run-time UI/rendering control template (optional) - this is the UI that is displayed when your field is collecting new values from a user on the new/edit item page.
  3. The field value class (optional) - this is how you will store the value that the user enters into the field
  4. The design time UI/editing control (optional) - this is the UI that a user will see when they add the custom field to a list

This is all described in the link above. There are many blog posts on creating custom fields.