- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-19-2019 09:56 PM
Hello,
I have a problem with script action which reacts to appropriate event, has access and can set up the "current" object, but does not update fields.
I have added some gs.log statements which show the code works partially apart of the current.update() part.
Can anyone please advise?
Many thanks,
Milan
My script action:
setFields();
function setFields() {
gs.info('!!!MILAN CURRENT STATES BEFORE SETTING THEM: ' + current.assigned_to + ' - ' + current.state + ' - ' + current.short_description);
current.state = '9';
current.short_description = 'Test from script action';
current.assigned_to = '';
gs.info('!!!MILAN CURRENT STATES AFTER SETTING THEM: ' + current.assigned_to + ' - ' + current.state + ' - ' + current.short_description);
try {
current.update();
}
catch(err) {
gs.error("UPDATE ERROR: " + err);
}
Log screen shot (not showing any update error so far..):
Solved! Go to Solution.
- Labels:
-
Scripting and Coding