locked
Readonly attribute and Word document information panel RRS feed

  • Question

  • Hi.

    Again, working with DIP...

    On a blank environment, I create a library; allow content typ management; add a managed metadata column on document content type. I set a default value on the list column.

    I update this column, with ShowInDisplayForm=True, ShowInEditForm=False, ShowinFileDlg=False

    The column is shown in Word Document Information Panel.

    I update the column, with ReadOnly=True. An then yes!!! The column is hidden in Word Document Information Panel.

    In production environment: even with ReadOnly=True the column is shown. Impossible to update it. Column and content type come from a content type hub, but I thought the DIP was crated only used local library column settings. Any idea?

    Could Microsoft explain how he standard DIP is created please?

    At last, ShowinFileDlg seems to be useless, do you agree?


    Wednesday, August 31, 2016 3:00 PM

Answers

  • Ok! For those taht may be interested in thtat, I thnik I got explanations... Sometimes I would like to talk to Microsoft developers and ask: why :-)

    So: you add a content type to a list.

    You add a column to the list; you customize it with readonly=true, showindisplayform=true

    Everything works as expected.

    you create a site content type. (First, DO NOT HIDE columns at site content type level, unless you like unexpected results :-) )

    You add that content type to a list. You customize the list column with readonly=true, showindisplayform=true

    THESE PARAMETERS ARE IGNORED! The content type columns use parameters from the list content type column, not from the list column! Yes! When you add a content type to a list, it ignores the list parameters set on the columns (excepting default values). It creates list content types fieldLinks, fields (why? useless with the fieldLinks!) and list content types fields parameters are what is important.

    There is one way to get what is needed: remove fieldLinks on the list content types, and then add list field in the list content type. What is missing in the "add content type to library" API code is a copy of the list field parameters.

    Hope it will be useful for someone else!

    Thursday, September 1, 2016 12:12 PM

All replies

  • Ok! For those taht may be interested in thtat, I thnik I got explanations... Sometimes I would like to talk to Microsoft developers and ask: why :-)

    So: you add a content type to a list.

    You add a column to the list; you customize it with readonly=true, showindisplayform=true

    Everything works as expected.

    you create a site content type. (First, DO NOT HIDE columns at site content type level, unless you like unexpected results :-) )

    You add that content type to a list. You customize the list column with readonly=true, showindisplayform=true

    THESE PARAMETERS ARE IGNORED! The content type columns use parameters from the list content type column, not from the list column! Yes! When you add a content type to a list, it ignores the list parameters set on the columns (excepting default values). It creates list content types fieldLinks, fields (why? useless with the fieldLinks!) and list content types fields parameters are what is important.

    There is one way to get what is needed: remove fieldLinks on the list content types, and then add list field in the list content type. What is missing in the "add content type to library" API code is a copy of the list field parameters.

    Hope it will be useful for someone else!

    Thursday, September 1, 2016 12:12 PM
  • Hi,

    Thanks for sharing! It will help others who suck with the problem!

    Best Regards,

    Dennis


    Please remember to mark the replies as an answers if they help and unmark them if they provide no help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com

    Friday, September 2, 2016 3:15 AM