Use a shared custom script in your library

This article explains how library administrators use a shared custom script in their library, by selecting one of its versions on a trigger.

Shared scripts are created in the AODocs tenant administration by super administrators and Script Administrators. Learn more: What are shared custom scripts?

Automatically generated table of contents

View the shared scripts

1. Open the library administration.

2. Select Custom scripts.

3. Select the Shared scripts tab. The Local scripts tab lists the scripts created in your library.

You can open a shared script to read its code and versions, but you can't edit it. To ask for a change, contact your super administrator or Script Administrator.

Screenshot 2026-11-27 at 17.14.10.png

Use a shared script on a trigger

You select one exact version of the script, so you always know which code runs in your library. Every version is available as soon as it exists; you don't have to wait for a deployment.

From the script page

1. In the Shared scripts tab, click the script name.

2. In the right panel, select the Trigger tab.

3. Click Add trigger.

4. Enter the Trigger name.

5. Select where the script runs (for example, the Document class for a Viewer Action).

6. In Version to use, select the version.

7. Click Create trigger.

Screenshot 2026-11-27 at 17.33.36.png

The trigger is listed in the Trigger tab, with the version it uses.

Screenshot 2026-11-27 at 17.34.05.png

From the document class, workflow or relations configuration

You can also select a shared script where you configure triggers, as for local scripts. Only the scripts that match the trigger type are listed, and each version is labeled with the script name and the version name, so you can tell a promoted version from a draft. Local scripts appear in the same list.

Screenshot 2026-11-30 at 11.52.13.png

Important: Don't use a draft version in a library that needs stable behavior: the draft's code can change at any time. Drafts are meant for testing.


When a new version is released

Your triggers keep using the version you selected until:

Note: A deployment doesn't change triggers that use a draft version. If the draft is deleted, the triggers that use it are cleared and the script no longer runs on them. If the whole script is deleted, it's removed from all your triggers.

The custom script log of your library shows which version of a script ran, and you can filter it to show only shared scripts.


Was this article helpful? 0 out of 0 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

0 comments

Please sign in to leave a comment.