Showing posts with label Model-driven app. Show all posts
Showing posts with label Model-driven app. Show all posts

Saturday 4 March 2023

How to check if any existing Model Apps use one of the MS deprecated Controls

Problem: Microsoft has listed 6 model app controls that shall no longer work from April 2024.  So how do I check if any of my existing model apps use the offending controls.

"Effective January 2023, the following controls for model-driven apps are deprecated: auto-complete, input mask, multimedia player, number input, option set, and star rating.

Why is this needed?

We will be introducing new Fluent UI controls that have better usability, accessibility, and dark mode support.

Impact

  • Starting April 2023, these controls can no longer be added to forms.
  • Existing control instances will work on existing forms until April 2024.

Action required by you

Evaluate existing forms that include a deprecated control and replace them with a newer control."  Source

Hypothesis:  I can go into the forms but I have a lot of forms, on multiple tables that have been customised.  I'd like to speed up the checking process to I'm going to add all model driven apps to a solution (default solution will get too big), and from there I'll extract out the unmanaged solution files and merely run a search for the six offending control names.

Proposed Solution:

https://youtu.be/F4LLF-y6RUo

1. Unpack your unmanged solution using the Power Platform CLI (pac cmd) onto your filesystem

2. Go to the folder containing all the files and do a search for the offending controls:

MscrmControls.NumberInput.NumberInputControl

MscrmControls.OptionSet.OptionSetControl

MscrmControls.Rating.StarRatingControl

Thought: The other 3 controls can no longer be added so as of March 2023, I don't know there names, I played with "mediaplayer" and the others and it looks like I don't have them in any of my solutions.

More Info:

It was way easier for me for a clients whole platform as the DevOps pipelines extract the unmanaged solutions into GitHub as part of each solution deployment.  I merely cloned the latest code base that included all Power platform solutions, and performed the searches to identify issues.  Modern model apps hardly had any instances of the offending controls but the older stuff needs more work to be done to remediate.

Performing the windows file search clearly shows if you have the problem:


i.e.

<Required schemaName="MscrmControls.NumberInput.NumberInputControl"..

<Required schemaName="MscrmControls.OptionSet.OptionSetControl"..

Friday 23 September 2022

Model Apps - Controlling the UI with JavaScript

Problem:  I have a form of view in a Model Driven App (Power Apps) that needs to show 1 of 2 tabs depending on a control in the form having a value.

js> If the "Status"="Active show the "Agent" tab else show the "General" tab

Hypothesis: inject JS into the specific form that will check the status display control, and if active, get the Agent tab via the DOM, and hide it.

Solution:

1. Ensure you have two tabs on your form, my form is called "Information", see below



2. Create a JavaScript file to manipulate the DOM, my example is below:
Create a .js file to upload

Reference Blog for most common JS CRM work

3. Upload the file and publish.


4. Bind the JS function on the form or page being adjusted.


5. Result when the Status is active to hide the "Agents" tab.

Saturday 3 September 2022

Generating a Word Document from a Row change in Dataverse without SharePoint

Problem:  Dataverse/Dynamics has a great way to generate Word or Excel documents in Model apps using the UI.  I want to generate a generate letter from a CDS entity/Table when the status changes.  And I'm not allowed to use OneDrive/SharePoint (governance restriction).

High-Level Steps:

1. Create Dataverse Table - ensure "Notes" & "Business process flows" are enabled

2. Generate the Word Template & add it to the "Template View"

Generate Word Template with dynamic column vals
Add Template

3. Create a Process to generate the output/docx from the Word template i.e. generate when status of the row changes


Activate the Workflow
4. Use Power Automate to call the Dynamics Process


Sunday 16 May 2021

Model Driven Apps in Power Apps

Overview:  Model-driven apps are one of three types of PowerApps we can build.  Sits on the CDS/Dataverse.

Model Driven Apps use the CDS to hold the data to drive the application.  CDS has an encrypted REST API to access the data which makes it great for building and connecting 3rd party applications.  

Choose from the three types of Power Apps available.

As the model driven app is based on the CDS model, you need to ensure you have the appropriate entities and attributes.  Very similar to ERD/UML modelling.  
  • Either standard or activity (time base) as a starting point for creating new entities.
  • There are lots of attribute type e.g. text field digital number, or email address...  
  • The Security model is great for ensuring the correct people have the appropriate rights to the data and CDS instance.  User can have multiple security roles and are additive (positive) in nature.
Note:  A lot of this information comes from the Power Apps App Maker training day from Microsoft.  The course is excellent and I wish I'd seen this before doing the PL-100 exam.