Thursday, January 19, 2012

Custom FormUrl s (Display, Edit & New) does not work for a custom content type

I was developing a custom list template with a custom content type. I had to implement our own custom forms for our custom content type (MyContentType). You can get how to add custom FormUrls for a content type from this MSDN documentation (http://msdn.microsoft.com/en-us/library/aa544142.aspx).

I did change the <FormUrls> in the custom content type definition as below. Even after I tried deploying quite a few times, it did not seems to take effect.

I was totally confused. After some struggle, I changed the inheriting content type to "Item" (0x0100) instead of "Post" (0x0110) content type, then the custom forms took the effect.



So, somehow it seems to me that some OOTB content types have display forms defined and it is not allowed to be overridden by our custom forms urls.

Happy coding
Senthil S

1 comment:

  1. Actually the problem you ran into was the base object 0x0110 is for a form library parent(hence a form library content type). 0x0100 is the parent object for Lists. Judging from the date of this post, you have probably determined this by now, but just in case, I thought I'd let you know.

    Cheers!

    ReplyDelete