Used to create substitution rules.
The method initializes a new substitution rule.
After entering the information, you need to save the rule by calling the ReplacementRuleItem.save method.
// Create a substitution rule for the employee const rule = System.replacements.rules.create(); rule.data.__name = 'Rule'; rule.data.absent = Context.data.__createdBy; rule.data.replacement = Context.data.substitution; rule.data.filter = { query: `[__name] = ${Context.data.taskName} or [dueDate] < @p1`, params: { p1: new Datetime ('2025-10-01T10:10:10') }, }; await rule.save();
The method allows you to search for substitution rules.
The Search object is used to retrieve collection items:
const rules = await System.replacements.rules.search() .where (r => r.absent.eq(Context.data.absent_user)) .all();
Your review is successfully sent!
Feedback sent successfully
Substitution rule object.
Used to create substitution rules.
Hierarchy
Methods
create
The method initializes a new substitution rule.
After entering the information, you need to save the rule by calling the ReplacementRuleItem.save method.
// Create a substitution rule for the employee const rule = System.replacements.rules.create(); rule.data.__name = 'Rule'; rule.data.absent = Context.data.__createdBy; rule.data.replacement = Context.data.substitution; rule.data.filter = { query: `[__name] = ${Context.data.taskName} or [dueDate] < @p1`, params: { p1: new Datetime ('2025-10-01T10:10:10') }, }; await rule.save();Returns ReplacementRuleItem
search
The method allows you to search for substitution rules.
The Search object is used to retrieve collection items:
const rules = await System.replacements.rules.search() .where (r => r.absent.eq(Context.data.absent_user)) .all();Returns ReplacementRulesSearch