2011-10-25 14 views
2

Sharepoint 2010を初めて使用しています。現在、ルックアップフィールドを作成してコンテンツタイプに追加し、Visual Studio 2010 SharePointプロジェクト経由でリストに追加しようとしています。しかし、私はいくつかの奇妙な問題を経験する。Sharepoint 2010ルックアップフィールドIDフォーマット

私は次のようにルックアップフィールドを定義しました:

<Field ID="{2A5567B7-1175-4E26-A4ED-382E4744D17A}" Type="Lookup" Name="SomeLookupField" List="Lists/SomeList" ShowField="ItemName" DisplayName="Some Field" Group="Custom Group" ReadOnly="TRUE" /> 

それから私はするFieldRef要素を介してcontentTypeのためにこれを追加しました。最後に、リスト定義にはSchema.xmlの同じ要素が含まれています

テンプレートとして自分のサイトを保存しようとするまでは正常に動作します。 SharePointがサイトのエクスポートに失敗し、エラーが表示されます。

エラーによって引き起こされる

Microsoft.SharePoint.SPException: Error exporting the site field named "SomeLookupField". at Microsoft.SharePoint.SPSolutionExporter.ExportFields(SPFieldCollection fields, String partitionName)

:遊ん

SPSolutionExporter: System.FormatException: Guid should contain 32 digits with 4 dashes (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx). at System.Guid..ctor(String g) at Microsoft.SharePoint.SPSolutionExporter.GetFieldSchemaXml(SPField field, SPWeb web, Boolean isFieldFromWeb, Boolean removeSealedAttribute) at Microsoft.SharePoint.SPSolutionExporter.ExportField(SPField field, SPWeb web)

私は、ルックアップフィールドのIDは、中括弧を含めると、次のようにすべきではないことが分かりました:

<Field ID="2A5567B7-1175-4E26-A4ED-382E4744D17A" 

変更後、エクスポートが正常に開始されます。私は私のルックアップフィールドの定義と間違っていることができるか疑問に思う

Error occurred in deployment step 'Activate Features': The field with Id {2A5567B7-1175-4E26-A4ED-382E4744D17A} defined in feature {235313d2-4091-4655-8b35-70b3ad31b9f4} was found in the current site collection or in a subsite.

を:しかし、Visual Studioのから再配備することは、古い機能を削除し、エラーで更新機能の活性化に失敗しながらフィールドを削除しないようになりました壊れていますか?ルックアップフィールドを定義するための有効なフォーマットは何ですか?

答えて

2

解決策が見つかりました。参照列の定義には、上書き属性が 'TRUE'に設定されている必要があります。それについてのブログhere

+0

ありがとう、正確に同じ問題に直面して、あなたは時間を節約しています:) – Kai

関連する問題