Adding aspect to existing document in the repository

cancel
Showing results for 
Search instead for 
Did you mean: 
ltsaty
Member II

Adding aspect to existing document in the repository

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
abbask01
Senior Member

Re: Adding aspect to existing document in the repository

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
Member II

Re: Adding aspect to existing document in the repository

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