Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ExecutionContext rework. #159

Merged
merged 3 commits into from
Jan 10, 2020
Merged

ExecutionContext rework. #159

merged 3 commits into from
Jan 10, 2020

Conversation

sergeytunnik
Copy link
Contributor

There were missing process related typings at first. As I was adding them it turned out that getEventArgs and getEventSource return different types depending on the actual raised event. PowerApps documentation seems incomplete for many scenarios. I've mined next details through debugging:

Event Source Type Args Type
Attribute OnChange Attribute undefined
Form OnLoad UiModule any?
OnStageChange Stage StageChangeEventArguments (new)
OnStageSelected Stage StageSelectedEventArguments (new)
OnProcessStatusChange Process any?
Form OnSave PageEntity SaveEventArgs

I left any because there is some object with methods but they aren't documented anywhere.
Also getUrl isn't member of ExecutionContext. It is on the Page.

Generic ExecutionContext with additional type parameter for getEventArgs fits nice in type definitions. At the same time it brings breaking changes. Anyway I haven't found a way to make it backwards compatible.

@magesoe magesoe merged commit 0ebec6b into delegateas:gh_master Jan 10, 2020
@magesoe
Copy link
Collaborator

magesoe commented Jan 10, 2020

Nice catch. Don't know if it could be done in a non-breaking way.
It is breaking for version previous to 9.x, so I decided to bump the version to 5.0.0 to indicate that anyone that are still stuck on using Xrm.Page should not go to this version yet. One could fix the errors for the previous version, but Xrm.Page has been deprecated for a long time already - it's time to leave it behind.
Added in 5.0.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants