Skip Ribbon Commands
Skip to main content

Tanmay Shahane | zevenseas | SharePoint Blog

:

Tanmay Shahane | zevenseas | SharePoint Blog > Posts > Taxonomy service on Office 365 and sandbox solutions
June 17
Taxonomy service on Office 365 and sandbox solutions

Hello kind readers….

Some time back I had a requirement to use Taxonomy column values in a custom web part in my Office 365 solution, basically the requirement was to fill a drop down control with all the values of a particular term of a TermSet .
 
Now with the limitations in office 365 or sandbox solution is with the taxonomy DLL, you cannot access the terms classes in your object model.
 
Back then, I did try to search ways of doing it but never could come up with something concrete (clearly I didn’t explore deep enough). Today while poking around in the internet and the ECMA script client object model documentation I could come up with a way to query the meta data column (taxonomy) for its terms … and this could become possible when it was coupled with the power web services SharePoint provides out of the box.
 
Basically it’s a three part process,
  • Get the Metadata Field from you web or list using client object model and then get the schema xml of the field (field.get_schemaXml())
  • From the Schema XML, get the sspId, TermSetId, TermId and GroupId of the term associated with the column
  • Get the http://[Server]/sites/ColumnSite/_vti_bin/TaxonomyClientService.asmx web service and call the GetChildTermsInTermSet and GetChildTermsInTerm web methods to get the required values of the metadata column from the term store
 
This is all in a nut shell that you need to do for getting the values of a metadata column that too using pure native JavaScript and no need for any third party library or in fact Jquery (in case you want totally native solution, which I sometimes like :) )
 
Well, enough talking, now the action… so obviously your question must be… "Ok, got the point but how exactly is this to be done?"  … hmm well to answer this I have the attached file with this post which contains the code that gets the specified meta data field terms and prints them out in a UL list form in a DIV… this you can modify according to your needs.
 
You just need to uploaded the attached file (its in .txt format) then add  a content editor web part on any page you want the functionality on and then in the CEWP web part properties … in the content link.. Refer to this uploaded text file.
 
Have a look at the text file to modify the parameter as per your site … comments are provided in the file itself.
All you need to provide are two things at the bottom

 

  1. Name of the meta data field you want to get terms from
  2. URL of the taxonomyclientservice.asmx from the site/list where your column is
 
Please let me know you find this helpful at all… hope it can open up some doors for functionalities which you missed out before… I wish I explored this earlier.
 
 

                      - "T"

Comments

Christian Louboutin Boots On Sale


My partner and i take a nap, please take a straw head wear, along with buckles face,desire grass inside Hong Kong. I came to be to depart you, Once you enter in the path involving crimson dirt,   Christian Louboutin Boots On Sale   the actual wind chime because i tend not to invest the particular wedding ring.While this individual came up, This individual shook his / her head in a very vast natrual enviroment road, and smiled. I will be myself, you did not maintain myself in a aspiration.
http://www.zamshoes.com/ Christian Louboutin Boots On Sale
http://www.zamshoes.com/categories-pumps.html black christian louboutin pumps sale
http://www.zamshoes.com/categories-boots.html christian louboutin boots on sale
http://www.zamshoes.com/categories-for-men.html  christian louboutin men
http://www.zamshoes.com/categories-sneakers.html christian louboutin sneakers sale
http://www.zamshoes.com/categories-flats.html christian louboutin flats cheap
http://www.zamshoes.com/miu-miu-shoes.html miu miu shoes outlet
http://www.zamshoes.com/jimmy-choo.html jimmy choo shoes on sale
http://www.zamshoes.com/manolo-blahnik.html manolo blahnik something blue
 on 11/4/2012 4:41 PM

Re: Taxonomy service on Office 365 and sandbox solutions

Excellent, thanks
 on 1/30/2013 12:51 PM

Add Comment

Title


Body *


Attachments

 

 Related Posts

 
 

 Statistics

 
Views: 1000
Comments: 2
Tags:JavaScript
Published:336 Days Ago