Tell me more ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I have a ListTemplate which is being deployed with Visual Studio.

Is it possible to make a reference from this template to an external content type that runs on the farm? Or must I manually add these columns within the SharePoint UI?

I've saved the list as a template, and looking at the relevant <Field> tags in the extracted manifest.xml gives me:

<Field Type="BusinessData"
    DisplayName="Staff ID"
    Required="FALSE"
    ID="{c56a95c8-b5f4-4e83-8eb9-eb75743f8837}"
    SourceID="{6db0b01d-3673-435d-93d6-c7d7d3757185}"
    StaticName="Staff_x0020_ID"
    BaseRenderingType="Text"
    Name="Staff_x0020_ID"
    ColName="nvarchar12"
    RowOrdinal="0"
    SystemInstance="People"
    EntityNamespace="People"
    EntityName="Staff"
    BdcField="StaffID"
    Profile="/_layouts/ActionRedirect.aspx?EntityNamespace=Mwe%2ESharePoint%2EStaffInfo%2EPeople&amp;EntityName=Staff&amp;LOBSystemInstanceName=People&amp;ItemID="
    HasActions="True"
    SecondaryFieldBdcNames="(trim)"
    RelatedField="Staff_ID"
    SecondaryFieldWssNames="(trim)"
    RelatedFieldBDCField=""
    RelatedFieldWssStaticName="Staff_ID"
    SecondaryFieldsWssStaticNames="(trim)"
    AddFieldOption="AddToDefaultContentType, AddFieldToDefaultView"
    Version="1"/>


<Field Type="Note"
    DisplayName="Staff_ID"
    Hidden="TRUE"
    ReadOnly="TRUE"
    BdcField="Staff_ID"
    ID="{26213047-a755-412f-98f5-6c2492c863b6}"
    SourceID="{6db0b01d-3673-435d-93d6-c7d7d3757185}"
    StaticName="Staff_ID"
    Name="Staff_ID"
    ColName="ntext2"
    RowOrdinal="0"/>

The problem is, when I try to put this into my List Template's Elements.xml in the project/solution it fails with pretty much every one of the attributes in the BusinessData-typed Field.

share|improve this question

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.