User Tools

Site Tools


This is an old revision of the document!

Before Share Script


A before share script allows the current record that is being shared to be processed after it is loaded into a GlideRecord, but before it is encrypted and queued up to the Perspectium Cloud Server. This feature is available for both Dynamic Share and Bulk Share

The script expects server side javascript, and is preconfigured with a globally available variable called current that is the GlideRecord object that is going to be shared.

For example, to ensure that the short_description field value of a record to always be greater than 0 and less than 1000 characters, you may use the following script:

var s = current.short_description.toString();
current.short_description = s.substring(0, 1000);

Because this script is executed overtime a record is shared, be aware of the processing delays introduced that will be multiplied when sharing multiple records at the same time.

before_share_script.1425279392.txt.gz · Last modified: 2015/03/01 22:56 by dloo