Here is my code:
<?xml version="1.0" encoding="utf-8"?> <Elements xmlns="http://schemas.microsoft.com/sharepoint/"> <Field ID="{A57D77CA-9D80-458A-AB81-884C4F5A946D}" Name="internalName" StaticName="internalName" DisplayName="Body" Type="Text" RichText="TRUE" RichTextMode="FullHtml" Required="FALSE" Group="myGroup" /> <Field ID="{BE6CFDC4-07CF-4175-99E7-E82259A41B5F}" Name="internalName2" StaticName="internalName2" DisplayName="myBadField" Type="Calculated" RichText="TRUE" RichTextMode="FullHtml" Required="FALSE" Group="myGroup"> <Formula>=[Body]</Formula> </Field> </Elements>
I created a content type based on those fields and then a list definition and a list instance. I deployed it successfully. But when I am creating a new entry in my list I got the following message:
Cannot complete this action. Please try again.
COMException (0x80004005)
Could someone tell me what am I doing wrong?
I’m using Visual Studio 2012, Windows Server 2008 R2 Enterprise and SharePoint 2010.