Skip to main content

Function: MnOnPostSave

▸ MnOnPostSave(): (target: any, key: any, descriptor: PropertyDescriptor) => void

Decorator that marks a method as an event handler for post save event.

This event is fired after the save event.

Remarks

Available on pages: Record only.

Registration: Automatic registration at runtime.

For more information, see Microsoft Client API Reference

Example

Notify that the record was saved

@MnComponent({
scope: {
pageType: "record",
table: "account"
}
})
export class NotifySavedComponent {
@MnOnPostSave()
onPostSave(eventArg: FormEventArg) {
eventArg.formCtx.ui.setFormNotification("Record saved", "INFO", "RecordSaved");
}
}

Returns​

fn

▸ (target, key, descriptor): void

Parameters​
NameType
targetany
keyany
descriptorPropertyDescriptor
Returns​

void

Defined in​

packages/core/src/core/metadata/events.ts:724