Boban Dragojlovic
05/08/2025, 9:19 PMCeligo AI
05/08/2025, 9:19 PMAI generated answer (using internal Slack threads):Yes, to call
record.executeMacro
, the record has to be in dynamic mode. This is because the executeMacro
method is only available on records that are in dynamic mode. In a User Event script, the record provided in the context is not in dynamic mode, hence the error message 'Cannot find function executeMacro in object standard record'.
Here is an example of how to use executeMacro
in dynamic mode:
javascript
var record = context.newRecord;
record.selectLine({ sublistId: 'item', line: 0 });
record.setCurrentSublistValue({ sublistId: 'item', fieldId: 'taxcode', value: taxCodeId });
record.commitLine({ sublistId: 'item' });
record.executeMacro({ id: 'calculateTax' });
******
Disclaimer:
This response was generated by an artificial intelligence assistant based on previous conversations from multiple Slack channels, and may contain inaccuracies or mistakes.
******Celigo AI
05/08/2025, 9:19 PMSlack thread 1: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.810482383
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.809729397
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.799690187
Celigo AI
05/08/2025, 9:19 PM