Skip to content

Fixing breaking changes in 5.0.0

Magnus Gether Sørensen edited this page Jan 10, 2020 · 1 revision

Version 5.0.0 introduced breaking changes to the Xrm.ExecutionContext type.

You probably use this type in all your onLoad functions in similar way to this

export function onLoad(context: Xrm.ExecutionContext<any>) {
    let formContext = <Form.account.Main.Account>context.getFormContext()

Instead, you now have to write this.

export function onLoad(context: Xrm.ExecutionContext<any,any>) {
    let formContext = <Form.account.Main.Account>context.getFormContext()

For other instances where you used Xrm.ExecutionContext refer to the table here for what you type you should provide.