Ga naar hoofdinhoud

CnMacrosWidget

The macros a record's schema declares, each with a button that runs it: type: "macros" on a detail page.

A macro is an OpenRegister declared action (configuration['x-openregister-action']) with macro: true and a bound manual flow. The widget lists them in declaration order and runs the pressed one through POST /api/objects/{register}/{schema}/{id}/actions/{action}, as the person and under the action's own right. After a run it asks the page to refresh (cn:page:refresh). The last run is read from the record's audit trail (action.macro); when the trail cannot be read the line is left out.

Content​

KeyTypeDescription
descriptionstringThe line under the title, translated.
emptyTextstringShown when the schema declares no macros, translated.

Example​

{ "id": "case-macros", "type": "macros", "title": "Macros", "content": { "description": "Several steps at once; then you see what changed" } }

Props​

PropTypeDefaultDescription
contentObject{}The widget's content above: description and emptyText, both translated
objectDataObjectnullThe bound record
objectIdString | Number''The bound record's id