AnsweredAssumed Answered

Adding comments to folder from a script

Question asked by fat_kid on Jul 28, 2015
Latest reply on Oct 7, 2015 by nancygaillard
Hi Everyone,
I'm trying to automate adding a comment when a folder is created. This way the folder can have a link to the CIFS windows share.
I'm using folder rules and a custom script.
In the script I've managed to find my way to the 'discussion' object on the node but can't seem to find any actual comments on this.
<blockquote>comments = document.childAssocs["fm:discussion"][0];</blockquote>
Anyone got any ideas how to get the comments nodes from the document node?
Or any other way that I can add a link to a folder when it's created so that users can easily jump from web interface to windows explorer?

I've manually created the following and it works great, but just wanting to automate it.
e.g. A folder in alfresco
has a comment with a url:

Any help would be much appreciated.

P.S. it's really hard to google for answers to this as Comment, Discussion and Forum are all <em>really</em> common words.