Sharepoint Publishing Meta Data Accessors

Posted by (JavaScript must be enabled to view this email address) on Fri 19 Dec 2008

You’ve spent the past four days writing the best code in the world to interface with MOSS 2007 and its publishing features. You run it and Argghhhhh! Whats going on, all your publishing data is not there!

Chances are you have done something like this to get the properties:
VB


dim startDate as DateTime = Convert.ToDateTime(item.Properties(“PublishingStartDate”));

C#


DateTime startDate = Convert.ToDateTime(item.Properties[“PublishingStartDate”]);

 

Instead, try accessing the properties like this:
VB


dim startDate as DateTime = Convert.ToDateTime(item(“PublishingStartDate”));

 

C#


DateTime startDate = Convert.ToDateTime(item[“PublishingStartDate”]);

Now get back to that killer code and get it fixed!

Your Comments

Post a Comment

Name

Email Address

Website

Remember my personal information

Notify me of follow-up comments?

Please enter the word you see in the image below:


← Back to Blog Homepage

About our Blog

Brantas Limited specialise in Dynamics CRM, SharePoint and System Integration using the Microsoft Platform. We are all experienced developers in various fields with our own specialities complementing those of our team.

We have been working with SharePoint since 2003, including Installation and Administration, Migration, Development and Support.

Related Solutions

    No Related Posts Found

Related Case Studies

    No Related Posts Found