Update Enterprise Keywords Using Remote API May 1, 2012
You can use the above approach with the client object model.
SharePoint Metadata DialogView and Internet Cache April 23, 2012
So let’s take a look at the HTTP call and the data returned. The call to owssvr.dll looks like this.
GET /somesite/_vti_bin/owssvr.dll?location=My%20Committee/Agenda%20attachment%20July%2009.doc&dialogview=SaveForm HTTP/1.1
The output returned by SharePoint is a bunch of HTML and JavaScript that MSWord then renders by calling the Internet Explorers rendering framework programmatically. (I’ve included sample output at the end of the post for the hardcore nerds).
So the question now becomes, what was preventing the correct HTML rendering on one PC and not the other? This was a difficult question to answer because I was unable to find a way to debug JavaScript when the output was rendered in Office 2003 apps.
When you think about it, there can be many potential causes here. Given that Internet Explorer is effectively doing the work (WinINet), this whole process could be adversely affected by add-ins, zone settings, AD policies, virus scanning, etc. On one affected PC I disabled all all-ins to Internet Explorer and retried without success. After around half an hour of frustration, I decided to reset IE’s configuration as shown below.
MetaData Navigation December 17, 2011
http://msdn.microsoft.com/en-us/library/microsoft.office.server.webcontrols.metadatanavtree.aspx
System.Object
System.Web.UI.Control
System.Web.UI.TemplateControl
System.Web.UI.UserControl
Microsoft.Office.Server.WebControls.MetaDataNavTree
Namespace: Microsoft.Office.Server.WebControls Assembly: Microsoft.Office.DocumentManagement (in Microsoft.Office.DocumentManagement.dll)
MetaDataNavTree.ascx
<!– _lcid=”1033″ _version=”14.0.4758″ _dal=”1″ –> <!– _LocalBinding –> <%@ Control Language=”C#” Inherits=”Microsoft.Office.Server.WebControls.MetaDataNavTree,Microsoft.Office.DocumentManagement,Version=14.0.0.0,Culture=neutral,PublicKeyToken=71e9bce111e9429c” compilationMode=”Always” %> <%@ Register Tagprefix=”SharePoint” Namespace=”Microsoft.SharePoint.WebControls” Assembly=”Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c” %> <%@ Register Tagprefix=”OfficeServer” Namespace=”Microsoft.Office.Server.WebControls” Assembly=”Microsoft.Office.DocumentManagement, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c” %> <%@ Import Namespace=”Microsoft.SharePoint.WebControls” %> <%@ Import Namespace=”Microsoft.Office.DocumentManagement.MetadataNavigation” %> <asp:Panel id=”TreeLabelPanel” runat=”server” Visible=”False” style=”padding: 5px 1px;”> <span style=”font-weight: bold; color:#003399;” > <SharePoint:EncodedLiteral runat=”server” text=”<%$Resources:dlcdm, MDN_Tree_Label_Configure_Settings_Here%>” EncodeMethod=’HtmlEncode’/> </span> </asp:Panel> <OfficeServer:NavResizerControl runat=”server” ID=”NavResizer” ResizeTargetControlName=”TreeViewRememberScroll”> <SharePoint:SPHierarchyDataSourceControl runat=”server” ID=”TreeViewDataSource” RootContextObject=”Web” IncludeDiscussionFolders=”true” ShowListChildren=”true” /> <OfficeServer:MetadataHierarchyDataSourceControl runat=”server” ID=”MetadataTreeViewDataSource” SPHierarchyDataSourceId=”TreeViewDataSource” /> <SharePoint:SPRememberScroll runat=”server” id=”TreeViewRememberScroll” onscroll=”javascript:_spRecordScrollPositions(this);” style=”overflow-y: auto; overflow-x: hidden;”> <SharePoint:SPTreeView runat=”server” ID=”WebTreeView” ShowLines=”false” DataSourceID=”MetadataTreeViewDataSource” ExpandDepth=”0″ SelectedNodeStyle-CssClass=”ms-tvselected” NodeStyle-CssClass=”ms-navitem” NodeStyle-HorizontalPadding=”2″ SkipLinkText=”" NodeIndent=”12″ ExpandImageUrl=”/_layouts/images/MDNCollapsed.png” ExpandImageUrlRtl=”/_layouts/images/tvclosedrtl.png” CollapseImageUrl=”/_layouts/images/MDNExpanded.png” CollapseImageUrlRtl=”/_layouts/images/tvopenrtl.png” NoExpandImageUrl=”/_layouts/images/tvblank.gif” AutoExpandSelectedNode=”true” > </SharePoint:SPTreeView> </SharePoint:SPRememberScroll> </OfficeServer:NavResizerControl> <OfficeServer:KeyFiltersControl runat=”server” ID=”ListViewKeyFilters” TemplateName=”KeyFiltersControl” AlternateTemplateName=”KeyFiltersCompositeFieldDefault” />
MetadataWebService.svc
Microsoft.SharePoint.Taxonomy.MetadataWebServiceApplication
Microsoft.Office.DocumentManagement.MetadataNavigation.MetadataNavigationSettings.GetMetadataNavSettingsXml
TaxonomyClientService.AddTerms Method
Namespace: Microsoft.SharePoint.Taxonomy.WebServices Assembly: Microsoft.SharePoint.Taxonomy (in Microsoft.SharePoint.Taxonomy.dll)
http://blog.robgarrett.com/2011/04/28/taxonomyclientservice-addterms-wrong-documentation/
Wrong documentation for the newTerm XML packet.
Problem with Adding a term.
Your code need a bit modification. You need to call termStoreTerm.CommitAll(); after “termSet.IsOpenForTermCreation = true;”. When you change the value of IsOpenForTermCreation, there’s a commit pending. So if you try to add a new term and then commit then the conflict comes up. Your code will look like below after the modification:
SPSite siteTerm = new SPSite(siteURL); TaxonomySession sessionTerm = new TaxonomySession(siteTerm); TermStore termStoreTerm = sessionTerm.DefaultSiteCollectionTermStore; TermSet termSet = termStoreTerm.GetTermSet(TermSetID); termSet.IsOpenForTermCreation = true; termStoreTerm.CommitAll(); termSet.CreateTerm(Term, sessionTerm.TermStores[0].DefaultLanguage); termStoreTerm.CommitAll();
However you can check if IsOpenForTermCreation is true. If so you don’t need to modify the value and commit.
Programmatically Add Term to Term Set July 25, 2011
$termSet = $termStoreGroup.CreateTermSet(“Term Set Name”)
#Create term, term description, and a synonym
$term = $termSet.CreateTerm(“Test Term”, 1033)
$term.SetDescription(“This is a test”, 1033)
$term.CreateLabel(“This is a test synonym”, 1033, $false)
#Update the Term Store
$termStore.CommitAll()
http://stevegoodyear.wordpress.com/2011/01/09/managing-sharepoint-2010-managed-metadata/
XML driven metadata update with GUID in input file.
http://bpostutor.com/post/SharePoint-2010-Managed-Metadata-Issues.aspx
Good tips on the metadata service. Including SQL to get terms and GUIDS for the terms.
http://msdn.microsoft.com/en-us/library/ee832800(office.14).aspx
MSDN developer introduction.
http://msdn.microsoft.com/en-us/library/ee556337.aspx
MSDN Taxonomy API
Local Term Store July 21, 2011
http://sharepoint.microsoft.com/Blogs/fromthefield/Lists/Posts/Post.aspx?ID=135
So far, so good – so why am I even writing about this? Well, the biggest problem
is that using a local term store means the site collection cannot be easily
backed up and restored – even to the same farm! So, if I were to take a backup
of my site collection, delete it, and then restore it from backup, this would
severe its connection with the term store group, the currently assigned values
would get ‘orphaned’ (i.e. greyed out and unchangeable), and the next time I
would try and access the properties of my ‘Document Class’ column, I would get a
warning message:
Frontpage Extensions and Sharepoint and Metadata September 22, 2010
The rpc frontpage call “put document” will not work with the new open document standard (xps) in office 2007 files. The code in the author.dll fails to find the properties when they are stored in the xps/xml format. You may want to test this using SP1 to see if it is fixed. The work around when working with xps type files such as docx is to use the “put document” and then do another rpc call “setDocsMetaDataInfo” setting the properties explicitly. The other problem with the Doc files is a property demotion issue. You may want to read the link below about document parsing with property promotion and demotion to make sure all things are aligned for this to work.
http://msdn2.microsoft.com/en-us/library/aa543341.aspx
http://sharepointfieldnotes.blogspot.com/2009/09/office-2003-files-are-second-class.html
After uploading a file you can examine the metadata that is generated for the document in the “AllDocs” table in the corresponding content database in sql server. Below is an example of what is generated in the metaInfo column of the table when you upload a file.
Subject:SW|
vti_error0:SX|Could not process the file mosstestsearch/test.doc as a Microsoft Office document.
vti_parserversion:SR|12.0.0.6219
Keywords:SW|
vti_cachedcustomprops:VX|Subject Keywords _Author _Category _Comments
vti_modifiedby:SR|BASESMCDEV\\steve.curran
vti_title:SW|foreign
ContentType:SW|Document
ContentTypeId:SW|0x01010017483E443739384889CC3E4B64BC3B6B
_Author:SW|joe.smith
_Category:SW|
vti_error:IX|1
_Comments:SW|
vti_author:SR|BASESMCDEV\\steve.curran
testcol:SR|STUFF
You can see when uploading Office 2003 files SharePoint adds a metadata error entry “vti_error0″ stating “Could not process the file as a Microsoft Office document”. Hmmm. I do believe this is an office document, just not an Office 2007 document. The document’s properties are promoted correctly because I can go into the SharePoint UI and view the properties. For instance, vti_title maps to the title property and testcol maps to the testcol property. Unfortunately, if I open this document in Office 2007 none of the properties are visible. So why are these properties not getting demoted correctly? The key here seems to lie with the “vti_cachedcustomprops” property.
Programmatically Add Value To TaxonomyField August 25, 2010
http://blog.xsolon.net/Posts/settaxonomyfieldwithcode
Notice that the string is formed as a lookup collection of ids and names. In fact the taxonomy filed is a lookup field. However the terms in the Taxonomy do not have an integer id…
Where is this id coming from you may ask?
It truns out the the terms are actually stored on a hiddent list, and the integer ids are the ids of the terms in this list.
If you look at the definition of the field in the list you will see that we have two fields: LookupList and LookupWebId.
Managed Metadata Service Introduction
http://blog.contentmanagementconnection.com/Home/21995
A term is a word or phrase that can be associated with an item in SharePoint 2010. And a term set is a collection of related terms. There are two types of terms in SharePoint 2010:Managed terms – these terms are usually pre-defined by an enterprise administrator. Managed terms can be organized into a hierarchy and can be selected by users via the new “managed metadata” column type. When a column of this type is defined the user will be allowed to select the metadata from the set of pre-defined managed terms.
Managed keywords – these are words or phrases that have been added to SharePoint 2010 items. Keywords are often used in more ad-hoc folksonomies where the user is allowed to tag an item with whatever keywords they believe are appropriate. Keywords are never represented in a hierarchy.









