Administrators can add custom features to their libraries using custom scripts.
Automatically generated table of contents
If you need guidance to configure and implement your custom scripts, the AODocs service team is 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 email@example.com.
What are custom scripts?
Custom scripts are java code fragments configured in the AODocs administration interface. Custom scripts allow library administrators to configure specific actions in their libraries that are not available out of the box in AODocs.
How are custom scripts triggered?
There are five types of custom script:
- Viewer Action: These custom scripts are triggered when users select a custom action in the document action bar.
- Workflow Transition Action: These custom scripts are triggered when a workflow transition is performed, when the document leaves a workflow state or enters a workflow state.
Update Action: These custom scripts are triggered when the document is updated.
Note: Edits on attachments don't trigger the update action.
- Relation Render Action: These custom scripts are triggered when users load the relation section of a document page. They can hide or display related documents.
- Relation Filter: These custom scripts prevent users from adding specific documents as related items. They filter the list of documents that can be added as related documents.
After creating a custom script, in the library administration you must configure how it will be triggered by users. Below is a summary of where you need to configure how each type of custom script is triggered.
|Type of custom script||Where to configure how it's triggered||Example use case|
|Update Action||Document class page||Add prefixes to the names of attachments|
|Viewer Action||Document class page|
|Workflow Transition Action||Workflow state||Record who performed a workflow transition in a Person property|
|Relation Filter||Relations page||Filter which documents can be added as related items|
|Relation Render Action||Relations page||Filter displayed related documents and customize display name|
Create a custom script
To create a new custom script:
1. Access the library administration and select Custom scripts.
2. Click Add new value and name your script.
3. Select the custom script type:
- Viewer Action
- Workflow Transition Action
- Update Action
- Relation Filter
- Relation Render Action
Tip: Click the edit button to rename your script.
Note: You can't change the type of an existing script.
4. Click the name of your custom script to configure it.
Learn more: Configure custom scripts.