cancel
Showing results for 
Search instead for 
Did you mean: 

I want to use a categoryService with rules

yosk
Champ on-the-rise
Champ on-the-rise

Newbie question:

 

I'm using version of Aflresco Community - 5.2.0 (r135134-b14)

I'm custmizing page of the document-details.

 I would like to use categoryService in rule definition, but I do not know how to realize it.

ex)

 NodeRef newCategory = categoryService.createCategory(yearsCategory, "1901");

As far as I know ,can do with Alfresco Share Javascript API.

How do I use ?

 Please how should I solve this problem?

Thanks in advanced.

1 REPLY 1

sychel
Champ on-the-rise
Champ on-the-rise

Hi Yoshida,

I think you can try Alfresco JavaScript Classification API

And there is a method called createSubCategory

Only one thing, you'll have to know the category NodeRef before you write your scripts.

Example code:

var category = classification.getCategory(nodeRef);
      if (category !== null)
      {
         category.createSubCategory(name);
      }