2

If you open the DispForm.aspx for an item in a Calendar List, you see a link and display text to the Meeting Workspace (if one exists) for that event.

How can I access the link to the Meeting Workspace from the Object Model? There appears to be a boolean field called "Workspace" which says if one exists or not, but I can't seem to find a way to see which Workspace it links to.

Any ideas?

1 Answer 1

2

This seems to work for me

using (SPSite site = new SPSite("http://siteurl"))
        {
            using (SPWeb web = site.OpenWeb())
            {
                SPList calendar = web.Lists["Calendar"];

                foreach (SPListItem item in calendar.Items)
                {
                    bool hasWorkspace = Convert.ToBoolean(item["WorkspaceLink"]);
                    if (hasWorkspace)
                    {
                        string workspace = item["Workspace"].ToString();
                    }
                }
            }
        }
1
  • Apologies, took too long to reply! That does work now, thanks. Not sure where I was going wrong, think I was (somehow) confusing Workspace and WorkspaceLink fields. Thanks again.
    – James Love
    Commented Apr 23, 2010 at 11:13

Your Answer

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

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