2

I have created one custom calendar list in SharePoint hosted app and when I am trying to create new event it is not showing defaults columns(start date ,end date...etc) along with my custom created columns.

enter image description here

Can any one tell me why it is happening?

I am using content type and in which I have some custom columns and these only getting displayed along with title while creating new event.

2
  • Your custom content type should inherit from Event content type. Aug 23, 2016 at 5:56
  • how to make it inheritable from event content type?in my elemts.xml file there is property Inherits="TRUE" ,with this i have to do something?
    – Madhav
    Aug 23, 2016 at 6:03

1 Answer 1

5

Most likely your custom content type is deriving from Item content type. You need to inherit it from Event content type. If you are adding a content type using Visual Studio, you are presented with an option to select the parent content type as shown: Choose Content Type

However, if you already have created it, you can still modify the Elements.xml file. Id of Event is 0x0102. Append this value in ID property of Content Type followed by the GUID. Example:

?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
  <!-- Parent ContentType: Event (0x0102) -->
  <ContentType ID="0x010200B5BDA8DA0B8944F0AE8ACE1A38228A59"
               Name="Holiday"
               Group="Custom Content Types"
               Description="My Content Type"
               Inherits="TRUE"
               Version="0">
    <FieldRefs>
    </FieldRefs>
  </ContentType>
</Elements>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.