Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Version History

Version 1 Next »

 

What is Case Scripting?

Case Scripting allows you to add your own scripts to customize SaasCase.The scripting language used is JavaScript so users that are familiar can jump in straight away begin creating their own scripts.

Users that do not have the technical knowledge to write their own scripts can refer to our example scripts. Or, if you would like us to create bespoke scripts for you, do not hesitate to contact us on sales@saascase.com for information and pricing.

There are three different scripting options available: JavaScript custom fields, on load scripts and on save scripts. JavaScript fields are added to a custom field group whilst on load and on save scripts are created in the "Scripting" option in the settings menu

 

JavaScript custom fields

JavaScript label custom fields allow you to run scripts in the tab that contains the field. Since these are only active in the tab they inhabit, they cannot be used with our reporting functionality or in documents.

This can be used to carry out calculations. For example, you could create a script that works out a clients age from their date of birth.

You can also add scripts to change the UI such as creating dynamic dropdown menus or showing and hiding fields depending on the value of another.

Custom formatting is also available, for example text could display in red if a value is 0 or green if the value is greater than 0.

You can find out more about JavaScript label custom fields in the custom field guide here.

 

On load scripting

On load scripting runs when the system loads a case.

These scripts can create alerts, such as displaying a message if the case has not been accessed in a certain time period

On load scripting can also be used to alter the UI. For example, you could create an icon to display case status, show or hide fields and create shortcuts to frequently used features.

On load scripts can access any information in a case. This is useful as they can be used to pull information buried in custom field groups and surface it on the front page of the case.

 

On save scripting

On save scripting runs when a case is saved. These scripts are useful for automating actions depending on the values in the case.

For example an automated email could be sent if certain criteria are not fulfilled or a task could be added to a users schedule.

On save scripting can also be used for complex validation- if an incorrect set of values are entered you could create a script that would halt the refresh and prompt the user to enter a new value.

You can also use on save scripting to automatically update fields depending on the value of others.

 

 

  • No labels