cancel
Showing results for 
Search instead for 
Did you mean: 

JS script

_jan
Champ on-the-rise
Champ on-the-rise
Hi
I am trying to add JS script which will auto fill atribute of document after I create it. Is there way to write this script into alfresco before I create .amp file for deployment ?
It is primitive script like:

<javascript>
var settings = companyhome.childByNamePath("Data Dictionary").childByNamePath("Settings").childByNamePath("idGen1");

var docId = parseInt( settings.properties["sc:idGenerator"] );
settings.properties["sc:idGenerator"] = docId + 1;
settings.save();

document.properties.name = document.name + "-" + docId;
document.save();
</javascript>
1 REPLY 1

kaynezhang
World-Class Innovator
World-Class Innovator
you can bootstrap your script in to repository dictionary scripts folder using your amp spring configuration file
Getting started

Tags


Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.