cancel
Showing results for 
Search instead for 
Did you mean: 

Adding aspect to existing document in the repository

ltsaty
Champ in-the-making
Champ in-the-making
Hi ! Nobody has a JavaScript to add or remove an aspect (appl: inlineeditable ) 
to do
cuments that are already imported into the repository.
I am very annoyed, I should have included this aspect in the rule before import.
Can you help me p
lease?
Thanks
Léon TSATY
2 REPLIES 2

abbask01
Star Collaborator
Star Collaborator

You can create your own script for that:

1. search for the documents that needs to be updated using "search" root object.

2. Iterate the result script nodes and add your aspect with required properties using "node.addAspect(...)"

OR

create a rule that applies to your specific type, apply the rule on the root folder then add a script for adding aspect using "document.addAspect(..)"

Look in documentation on help regarding JS root objects and useful methods.

The javascirpt console would be a helpful in writing the scipt.

Regards,
Abbas

ltsaty
Champ in-the-making
Champ in-the-making

Hello

I can not create my own script because I do not know the javascript development language

I am a beginner on alfresco. So creating scripts is too sophisticated for me

Thanks