Logo 
Search:

MOSS Forum

Ask Question   UnAnswered
Home » Forum » MOSS       RSS Feeds

Content type Error

  Asked By: Erik    Date: Mar 25    Category: MOSS    Views: 632

I m trying to add a content type in my site with following code, but all the
other 2 fields r displaying but "Ship ID" is missing, please help if someone
already had similar issue.


<?xml version="1.0" encoding="utf-8"?>

<Elements Id="4f654e7f-eee5-4952-8221-c0f77605661c" xmlns="
http://schemas.microsoft.com/sharepoint/">

<ContentType ID="0x010026b136b3659b4837bb1615875cbf7bb6" Name="PaymentType"
Group="Development" Description="Developing Content Type" Version="0">

<FieldRefs>

<FieldRef ID="{7787BF63-83A1-446b-AFBB-20BE07D0A28D}" Name="InvoiceID" />

<FieldRef ID="{E69A8092-EA03-401a-9AA2-B1FA704DEC30}" Name="ShipID" />

<FieldRef ID="{EB133995-17F3-4b7f-BA43-40BFBE030724}" Name="PaymentStatus"/>

</FieldRefs>

<XmlDocuments>

<XmlDocument NamespaceURI="http://schemas.microsoft.com/sharepoint/events">

<Receivers>

<Receiver>

<Name>ItemAdding</Name>

<Type>ItemAdding</Type>

<SequenceNumber>1</SequenceNumber>

<Class>5f379411-6a93-4e12-a3d0-7880a3248d8a</Class>

</Receiver>

</Receivers>

</XmlDocument>

</XmlDocuments>

</ContentType>

<Field ID="{7787BF63-83A1-446b-AFBB-20BE07D0A28D}" Type="Text" Name="
InvoiceID" DisplayName="Invoice ID" StaticName="InvoiceID" Hidden="FALSE"
Required="TRUE" Sealed="FALSE" />

<Field ID="{E69A8092-EA03-401a-9AA2-B1FA704DEC30}" Type="Text" Name="ShipID"
DisplayName="Ship ID" StaticName="ShipID" Hidden="FALSE" Required="TRUE"
Sealed="FALSE" />

<Field ID="{EB133995-17F3-4b7f-BA43-40BFBE030724}" Type="Choice" Name="
PaymentStatus" DisplayName="Payment Status" StaticName="PaymentStatus"
Hidden="FALSE" Required="TRUE" Sealed="FALSE">

<CHOICES>

<CHOICE>Billed</CHOICE>

<CHOICE>Paid</CHOICE>

</CHOICES>

</Field>

</Elements>

Share: 

 

4 Answers Found

 
Answer #1    Answered By: Phenil Poriya     Answered On: Mar 25

There doesn't appear to be anything wrong with your code. Do you already have
ShipID somewhere else in your site?

 
Answer #2    Answered By: Dante Parsons     Answered On: Mar 25

thanks for the reply.

yes, with one more content type.Below is the code for 2nd Content type
Shipping in same project


<?xml version="1.0" encoding="utf-8"?>

<Elements Id="e45c908b-d6fc-40e4-a64a-276fd8b7122f" xmlns="
http://schemas.microsoft.com/sharepoint/">

<ContentType ID="0x01002e72c6c8adc341ee82afac4f262a6688" Name="ShippingType"
Group="Development" Description="Developing Content Type" Version="0">

<FieldRefs>

<FieldRef ID="{11BA869D-59EE-4a17-8F1B-8568271F040E}" Name="ShipID" />

<FieldRef ID="{64BCE2F0-F976-47dc-A03E-41BDFDBEC595}" Name="ShipTo" />

<FieldRef ID="{845D9BFF-9A40-4e77-85A4-66A4AEE02214}" Name="ShipStreet" />

<FieldRef ID="{1579006E-EF1D-4ac3-9647-8630EAEE3E0A}" Name="ShipCity" />

<FieldRef ID="{A11145EF-8572-454c-A63A-3381436F18D5}" Name="ShipState" />

<FieldRef ID="{59715242-78B4-4fdb-917E-C75C443BAB20}" Name="ShipPostalCode"/>

<FieldRef ID="{724823CC-3C35-47c4-8067-95519D87FB4E}" Name="ShipTracking" />

</FieldRefs>

<XmlDocuments>

<XmlDocument NamespaceURI="http://schemas.microsoft.com/sharepoint/events">

<Receivers>

<Receiver>

<Name>ItemAdded</Name>

<Type>ItemAdded</Type>

<SequenceNumber>1</SequenceNumber>

<Class>0b0f9be2-09e8-4a36-8e01-1706252f6c0c</Class>

</Receiver>

</Receivers>

</XmlDocument>

</XmlDocuments>

</ContentType>

<Field ID="{11BA869D-59EE-4a17-8F1B-8568271F040E}" Type="Text" Name="ShipID"
DisplayName="Ship ID" StaticName="ShipID" Hidden="FALSE" Required="TRUE"
Sealed="FALSE" />

<Field ID="{64BCE2F0-F976-47dc-A03E-41BDFDBEC595}" Type="Text" Name="ShipTo"
DisplayName="Ship To" StaticName="ShipTo" Hidden="FALSE" Required="TRUE"
Sealed="FALSE" />

<Field ID="{845D9BFF-9A40-4e77-85A4-66A4AEE02214}" Type="Text" Name="
ShipStreet" DisplayName="Street" StaticName="ShipStreet" Hidden="FALSE"
Required="TRUE" Sealed="FALSE" />

<Field ID="{1579006E-EF1D-4ac3-9647-8630EAEE3E0A}" Type="Text" Name="
ShipCity" DisplayName="City" StaticName="ShipCity" Hidden="FALSE" Required="
TRUE" Sealed="FALSE" />

<Field ID="{A11145EF-8572-454c-A63A-3381436F18D5}" Type="Text" Name="
ShipState" DisplayName="State" StaticName="ShipState" Hidden="FALSE"
Required="TRUE" Sealed="FALSE" />

<Field ID="{59715242-78B4-4fdb-917E-C75C443BAB20}" Type="Text" Name="
ShipPostalCode" DisplayName="Postal Code" StaticName="ShipPostalCode" Hidden
="FALSE" Required="TRUE" Sealed="FALSE" />

<Field ID="{724823CC-3C35-47c4-8067-95519D87FB4E}" Type="Text" Name="
ShipTracking" DisplayName="Tracking" StaticName="ShipTracking" Hidden="FALSE
" Required="TRUE" Sealed="FALSE">

<CHOICES>

<CHOICE>Delivered</CHOICE>

<CHOICE>In-transit</CHOICE>

<CHOICE>Shipped</CHOICE>

<CHOICE>Waiting for Payment</CHOICE>

</CHOICES>

</Field>

</Elements>

 
Answer #3    Answered By: Luke Davis     Answered On: Mar 25

Thanks for the direction , I got the solution,

the problem was tht i was building 2 content types with same field but with
different *GUID,* whn I made the GUID same I could see the fields in both
content types.

 
Answer #4    Answered By: Daniella Landry     Answered On: Mar 25

is the content type already created and you are trying to update your
feature ?

 
Didn't find what you were looking for? Find more on Content type Error Or get search suggestion and latest updates.




Tagged: