Script action reacting to event having access to current object but not updating fields

Milan13
Giga Expert

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..):

find_real_file.png