cancel
Showing results for 
Search instead for 
Did you mean: 

How to run javascripts?

sihnu
Champ in-the-making
Champ in-the-making
Hello,

I would like to make plenty of spaces and I would like to write a script to do this. I've found some tutorials explaining how to make spaces with javascript but I don't know how to run the script.
I've been browsing the wiki but only found examples of javascripts. Please help.

Thanks in advance.
3 REPLIES 3

cristinamr
World-Class Innovator
World-Class Innovator
Hi

I wrote a post in my blog explain it, click here. This review is in spanish but the pictures are in english. You must read since "Una vez esté hecho este paso, debemos pinchar en More Action/View  Details/Run Action (Más Acciones/ Ver Detalles/Ejecutar una Acción) Con esto ejecutaremos el script que acabamos de subir a nuestro alfresco." from there you should read it.

Regards.
--
VenziaIT: helping companies since 2005! Our ECM products: AQuA & Seidoc

jordiv
Champ on-the-rise
Champ on-the-rise
Just in case you get a bit lost at the beggining.

In Alfresco Explorer, go to "Company Home" > "Data Dictionary" > "Scripts".
Then create a new script "Create" > "Create Content".
Give it a name, and make sure to select "Java Script" as its content type.

Then just follow the instructions of the previous post in order to run it.
Hope it helps!

Cheers,
Jordi.

sihnu
Champ in-the-making
Champ in-the-making
Thanks for the replies.

After messing around for a while I found out how to run the scripts. In any case someone other is having problems to run the scripts here is what I did (thought you can find this out from the replies of this post also):

At Company Home - Data Dictionary - Scripts

I uploaded my own script.

Then to run script:

1. I went to a space where the script should be run
2. Chose: More Actions -> View Details -> Run Action
3. From the "Select Action" drop down menu I chose: "Ececute Script"
4. "Set Values and Add"
5. From the script drop down menu I chose the script I wanted to run
6. Pressed "OK"
7. Pressed "Finish"

And that's it. I managed to create spaces with the example script I found by googling. This will save me from a lot of clicking and writing to create those spaces. Smiley Happy