AnsweredAssumed Answered

using CategoryService from webscript

Question asked by orha on Sep 22, 2009
Latest reply on Sep 23, 2009 by orha
Hi again.
Sorry to bother you twice a day, but I have one more question I couldn't find the answer to: I want to use categoryService API to add a new category from my webscript. I tried using:

function addCategory(newCat) {
   var tags = search.luceneSearch("PATH:\"/cm:generalclassifiable//cm:Tags\"")[0];
   var newCategory = categoryService.createCategory(tags, newCat);
   return newCategory;
Where Tags is the category under which I want to create the new category, and newCat is a string with the name of the new category.
When I run it, I get an error saying that categoryService is not defined.
Is there a way to use cateogryService? Is there anything else I should try?

Thank you!