change the state and active in contract on condition
This content was last updated in 2023. It may still be useful, but could contain outdated information. Please confirm its accuracy before relying on it.
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-28-2023 02:10 AM
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
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-28-2023 05:58 AM
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);