Posts

Showing posts from May, 2020

Move from using Xrm.Page to formContex in UCI form based PowerApps WebResources

Image
The usage of Xrm.Page is currently deprecated, still available due to it’s high usage, but still deprecated. When will it go away, we don’t really know yet. How then can we use it’s formContext replacement within a web resource. Well Microsoft recently added a the getContentWindow() function to the context which allows us to get the actual content of a web resource. By adding an onload function to our form and utilizing getContentWindow() we can now call javascript on our web resource and pass it the formContext. Additionally you can add the context to the window object of the web resource so that the formContext can be used throughout the lifecycle of the web resource. Here is a quick tutorial on how to pass the formContext to a WebResource on a UCI Form. formContext in WebResource Form OnLoad Code // This should be in a script loaded on the form. // form_onload is a handler for the form onload event. function form_onload(executionContext) { var formContext = executionCon...

Sparse Checkout with Git To Reduce Confusion

Image
If you would like to make updates to the Xrm types or any others in the DefinitelyTyped project on github you can find that cloning all the types can be a real pain. This is because a typical git clone will bring down everything and having over 6 thousand directories in this project can make thigns a bit slow. Startign with Git version 2.25.0 a new feature was introduces called sparse-checkout. This feature can be used to limit what is brough down in your git requests much like a .gitignore file, in fact it even uses the same filtering formats. The benefit of using this new feature is that you don’t need to update the .gitignore file which would be tracked in the changes. Instead these options are stored in your repo settings locally and will not show up as changes to your files. Let’s take a look! Here is my types directory in DefinitelyTyped clone. You can see that there are a lot of types, over 6K in fact. Righ now every time you do a pull it can take a little while because...

Multilingual Support For PCF Calendar Control

Image
Multilingual support has been added to the Calendar component I recently shared . This works in both Canvas and Model apps. The following languages are now supported. English (default) German French Spanish Italian Dutch Russian Click Here to download the latest release of the component. Click Here to get the source code for this component. Check out these videos on how to get the control working in a multilingual setup. Canvas Apps Multilingual Setup Model Apps Multilingual Setup