Find your people. Pick a challenge. Ship something real. The CreatorCon Hackathon is coming to the Community Pavilion for one epic night. Every skill level, every role welcome. Join us on May 5th and learn more here.

change the state and active in contract on condition

mregragui_ext
Tera Contributor

hello,

i want to change the state to expire and active to false in conctracts table whenever a contract END and renewel end is in the past.

Thanks for help!

5 REPLIES 5

Hi @mregragui_ext ,

Insted of setvalue use below script

(function executeRule(current, previous /*null when async*/) {

current.state='expirebackedname';
current.active='false';
current.setWorkflow(false);
current.update();
    }
})(current, previous);