Skip to main content

Function: MnOnDataLoad

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

Decorator that marks a method as an event handler for data load event.

This event is fired :

  • On initial load of the form.
  • When refresh() method is called.
  • When the user clicks the Refresh button on the form.

Remarks

Available on pages: Record only.

Registration: Automatic registration at runtime.

For more information, see Microsoft Client API Reference

Example

Data Load

@MnComponent({
scope: {
pageType: "record",
table: "account"
}
})
export class MyComponent {
@MnOnDataLoad()
onDataLoad() {
Xrm.Navigation.openAlertDialog({ text: "Data loaded" });
}
}

Returns

fn

▸ (target, key, descriptor): void

Parameters
NameType
targetany
keyany
descriptorPropertyDescriptor
Returns

void

Defined in

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