Create custom scripts

Administrators can add custom features to their libraries using custom scripts.

 Define the type of custom script you need
Create a custom script

 

Note:
If you need guidance to configure and implement your custom scripts, the AODocs service team would be happy to help you organize a design workshop and find solutions to automate your processes.
Contact your AODocs sales representative or send an email to sales@aodocs.com.


Define the type of custom script you need

A custom script is java code fragment configured in the AODocs administration interface. Custom scripts allow library administrators to carry out specific actions on their libraries that are not available in out of the box features in AODocs.

There are five different custom scripts:

  • Viewer Action: This custom script is executed when users select a custom action in the document action bar.
  • Workflow Transition Action: This custom script is executed when a workflow transition is performed, when the document leaves a workflow state or enters a workflow state.
  • Update Action: This custom script is executed when the document is updated.
    Note: Edits on attachments don't trigger the update action.
  • Relation Render Action: This custom script is executed when users load the relation section of a document page. It can hide or display related documents.
  • Relation Filter: This custom script prevents users to add specific documents as a related item. It is filtering the list of documents that can be added as related documents.

image_01.png

image_02.png


Create a custom script

To create a new custom script:

1. Open the library administration interface and select Custom scripts.

2. Press <Add new value> and name your script.

3. Select the custom script type: Viewer Action, Workflow Transition Action, Update Action, Relation Render Action or Relation Filter.

image01.png

4. Press the Edit button to rename your script.

Note: You can't change the type of an existing script.

5. Press the name of your custom script to configure it.

6. Configure your custom script.

Was this article helpful? 4 out of 4 found this helpful
If you didn’t find what you were looking for, don’t hesitate to leave a comment!
Have more questions? Submit a request

Comments

5 comments
  • Hello,
    I cannot see the customizations tab in my document class.I only have three tabs Properties, Security, advanced

    0
    Comment actions Permalink
  • To add a custom script to a class (update action or viewer action), you have add it in the "Advanced tab".

    0
    Comment actions Permalink
  • Is there a way to trigger a javascript. When opening an Item within a library, I need to execute an script that reads / gets a query string parameter, but from event for custom scripts, I don't see any like on load or when open. Is that possible to execute it when opening an Item?

    0
    Comment actions Permalink
  • Currently, our custom scripts only support java. Additionally, I confirm that there is no trigger for custom script execution at the document opening.
    The existing triggers are:
    - document update
    - workflow transition
    - custom button on the document
    - relations loading in a document (for filtering)
    Feel free to post a feature request here: https://support.aodocs.com/hc/en-us/community/topics/200132124-AODocs-Feature-Requests
    Following our guidelines: https://support.aodocs.com/hc/en-us/community/posts/360051089432-How-to-Post-a-Feature-Request-on-the-Community

    0
    Comment actions Permalink
  • Is there any Java documentation to can to create these scripts? This to know the objects, methods and functions. Thanks in advance.

    1
    Comment actions Permalink

Please sign in to leave a comment.