Skip navigation
All Places > Alfresco Content Services (ECM) > Blog > 2017 > July

Steps to add a custom button/link in Document Actions and Folder Actions on Document and Folder Level:


Step 1: Create a directory scripts in ...\tomcat\shared\classes\alfresco\extension\

Step 2 :

cd into ...\tomcat\shared\classes\alfresco\extension\scripts

Create a file publishDoc.js


document.copy(DestNode) - [write script according to your requirement]


Step 3:

Registering action

Create a context file custom-action-services-context.xml in \tomcat\shared\classes\alfresco\extension\ with the following code :


<?xml version='1.0' encoding='UTF-8'?>
   <bean id="publish-doc-action" parent="script">
      <property name="scriptLocation">
      <bean class="org.alfresco.repo.jscript.ClasspathScriptLocation">


Step 4:

Calling action

Add the following code to tomcat\shared\classes\alfresco\web-extension\share-config-custom.xml:

<config evaluator="string-compare" condition="DocLibActions">

Action definitions
<!– Publish Document –>
   <action id="publish-doc" icon="ic-publish" type="javascript" label="Publish">
      <param name="function">onActionSimpleRepoAction</param>
      <param name="action">publish-doc-action</param>
      <param name="successMessage">Successfully Published</param>
      <param name="failureMessage">failed</param>


<!-- For action button to show up at document level -->
   <actionGroup id="document-browse">
      <action index="460" id="publish-doc"/>
   <actionGroup id="document-details">
      <action index="400" id="publish-doc"/>

<!-- For action button to show up at Folder level -->

   <actionGroup id="folder-browse">
      <action index="460" id="publish-doc"/>
   <actionGroup id="folder-details">   
      <action index="400" id="publish-doc"/>


Step 5: Add icon image named ic-publish-16.png in tomcat\webapps\share\components\documentlibrary\actions\


Restart Alfresco server


You will be able to see a button in document Action and in Folder Action:

Search Services 1.1.0 is now available, here's a summary of what's changed. As ever, please let me know if you have any questions or you would like to give us any feedback.



New Search REST API Features

We have added support for new features in the search API. These come from feedback we received from the first release of the Search REST API with 5.2 and have added new capabilities to support more advanced reporting requirements. 


NB You will need either Community 201707 or the upcoming 5.2.1 release to take advantage of these.




New Sharding Option - DBID Range

We have added a new sharding method for Enterprise customers with a clustering license: DBID range sharding.


This will be the only option to offer any kind of auto-scaling as opposed to defining your shard count exactly at the start. The other sharding methods require repartitioning in some way.


For each shard you specify the range of DBIDs to be included. As your repository grows you can add shards. Look out for an upcoming blog post from search architect, Andy Hind explaining more about the differences between the different sharding methods. 



Bug Fixes

Complete list here

Filter Blog

By date: By tag: