2

We have a list based on media contenttypes. When we provision them with this xml:

<View Name="{2AC983A0-C495-4358-B821-7A465635AE08}" Type="HTML" DisplayName="All Assets" Url="/sites/PEX1000/MediaLibrary/Forms/All Assets.aspx" Level="1" BaseViewID="40" ContentTypeID="0x" ImageUrl="/_layouts/15/images/dlicon.png?rev=44" ><Query><OrderBy><FieldRef Name="LinkFilename" /></OrderBy></Query><ViewFields><FieldRef Name="ContentType" /><FieldRef Name="DocIcon" /><FieldRef Name="LinkFilenameNoMenu" /><FieldRef Name="Modified" /><FieldRef Name="Editor" /><FieldRef Name="MediaLengthInSeconds" /><FieldRef Name="NameOrTitle" Explicit="TRUE" CalloutMenu="TRUE" /><FieldRef Name="FileSizeDisplay" Explicit="TRUE" /><FieldRef Name="ImageSize" Explicit="TRUE" /><FieldRef Name="ImageWidth" Explicit="TRUE" /><FieldRef Name="ImageHeight" Explicit="TRUE" /><FieldRef Name="VideoWidthInPixels" Explicit="TRUE" /><FieldRef Name="VideoHeightInPixels" Explicit="TRUE" /><FieldRef Name="PreviewOnForm" Explicit="TRUE" /><FieldRef Name="Created_x0020_Date" Explicit="TRUE" /><FieldRef Name="Author" Explicit="TRUE" /><FieldRef Name="_Comments" Explicit="TRUE" /><FieldRef Name="PeopleInMedia" Explicit="TRUE" /><FieldRef Name="VideoSetDescription" Explicit="TRUE" /><FieldRef Name="VideoSetOwner" Explicit="TRUE" /><FieldRef Name="VideoSetUserOverrideEncoding" Explicit="TRUE" /><FieldRef Name="VideoSetDefaultEncoding" Explicit="TRUE" /><FieldRef Name="VideoSetExternalLink" Explicit="TRUE" /><FieldRef Name="VideoSetShowDownloadLink" Explicit="TRUE" /><FieldRef Name="VideoSetShowEmbedLink" Explicit="TRUE" /><FieldRef Name="VideoSetRenditionsInfo" Explicit="TRUE" /></ViewFields><RowLimit Paged="TRUE">20</RowLimit><JSLink>clienttemplates.js|SP.UI.TileView.js|SP.UI.AssetLibrary.js|callout.js</JSLink><XslLink>AssetPicker.xsl</XslLink><Toolbar Type="Standard"/></View>

It shows only default values and does not show data when i upload a file in the columns of the view.

I use the following code:

 var newView = createdList.Views.Add(new ViewCreationInformation
            {
                Title = viewTitle
            });
            newView.ListViewXml = view.SchemaXml;
            newView.Update();
            newView.EnsureProperties(v => v.Id);
            web.Context.ExecuteQueryRetry();

please let me know if you know a solution for this issue.

  • hey, @kbworks did you find any solution for this. If you have please share. I am latching same issue. Thanks – Bharat Khunti Jul 31 '18 at 13:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.