Function: MnOnColumnChange
▸ MnOnColumnChange(columnName
): (target
: any
, key
: any
, descriptor
: PropertyDescriptor
) => void
Decorator that marks a method as an event handler for column change event.
This event is fired when the value of a column is changed.
Remarks
Available on pages: Record only.
Registration: Automatic registration at runtime.
For more information, see Microsoft Client API Reference
Example
Notify the change of a first name of a contact
@MnComponent({
scope: {
pageType: "record",
table: "contact"
}
})
export class FirstNameChangeomponent {
@MnOnColumnChange("firstname")
onFirstNameChange() {
Xrm.Navigation.openAlertDialog({ text: "First name changed" });
}
}
Parameters
Name | Type | Description |
---|---|---|
columnName | ValueOrConfigPropertyMapper <string > | Name of the column or callback function that returns the name of the column from the component configuration. |
Returns
fn
▸ (target
, key
, descriptor
): void
Parameters
Name | Type |
---|---|
target | any |
key | any |
descriptor | PropertyDescriptor |
Returns
void