cancel
Showing results for 
Search instead for 
Did you mean: 

Anyone able to access the version.description property

ofrxnz
Champ in-the-making
Champ in-the-making
I am trying to create an email template to fire when a document is uploaded to a folder or versioned.

I would like to access the version description variable (the comments about that version) but haven't the foggiest how.

the version description is here. 
http://wiki.alfresco.com/wiki/3.2_JavaScript_API#Versions_API

I can also find it in the node browser but i dont know how to go from //workspace/version2store to the //workspace/spacesstore

Any ideas would be of great help

Thanks

Adam
2 REPLIES 2

mikeh
Star Contributor
Star Contributor
Have a look at the /api/version web script:

var versionHistory = node.versionHistory;
for (i = 0; i < versionHistory.length; i++)
{
   var version = versionHistory[i];
   …
      description: version.description,
   …
   etc.

Mike

ofrxnz
Champ in-the-making
Champ in-the-making
Thanks Mike,

That set me on the right track.  I believe my issue was i didn't use if statements so i guess it choked early in the list statement.

      <#list document.versionHistory as record>
            <#if record.description?exists>${record.description}</#if>
      </#list>

Adam