Servicely Administration
Scripting
Script Libraries
3 min
a script library allows you to create reusable scripts to run across different server side capabilities of the platform including inbound messaging docid\ zah49ic1z3qdqpzkk0u9t record generation docid 91uohxcs4dpgetx51vrid system controllers docid pfjtclem zcu8ktp8zjw a script library also helps to abstract complexities that would otherwise be exposed onto the respective platform capabilities mentioned above creating a script library field name field type description sample value name string name of the script library incidentutil active boolean yes to activate the script library yes description text use to provide high level information on what the script library is for utility functions for the incident management process script script classes and functions available within the script library the name of the script library needs to be the same as the one defined in the script e g incidentutil just like any other server side scripting on the platform, script library has access to table api (server) calling a script library if we are to call a function (called incidentutil getincidentopentasks) on the sample script library above on a trigger for the incident table, it will look like the following // anything we want to do before calling the script library let subtaskarr = incidentutil getincidentopentasks(current); // current is an incident's table record // do what we want with subtaskarr