Deluge Scripting Basic Use Case

Deluge Scripting Basic Use Case

Hello, I'm new to deluge scripting and I just need a bit of a foundation to start. I've created a really basic script for testing purposes:

// Check if the subject is 'Test'
if(requestObj.get("subject") == "Test")
{
// Update the subject to 'Updated'
requestObj.put("subject","Updated");
// Return a boolean (true) to confirm the update
return true;
}
else
{
// Return false if subject is not 'Test'
return false;
}

I just wanted to see if this script could affect the live environment. The script runs successfully but the value (the request/ticket) I select does not change. I know that I'm missing something, is it an API call of some sort? Some more information would be really helpful, thank you!

                New to ADSelfService Plus?