Friday, June 15, 2007

MOSS Custom Field Types

Custom field types allow you specify properties for the new field, such as the BusinessDataType in the schema below:

<PropertySchema>
            <Fields>
                <Field Name="BusinessDataType" DisplayName="Business Data Type" Type="Choice">
                    <CHOICES>
                        <CHOICE>Customers</CHOICE>
                        <CHOICE>Partners</CHOICE>
                    </CHOICES>
                    <Default>Customers</Default>
                </Field>
            </Fields>
        </PropertySchema>

When attempting to retrieve values from this schema in a custom field control you need to use the Field.GetCustomProperty method, as there is no Fields collection exposed.

del.icio.us Tags: , , ,

No comments: