Install Smart Buttons for Ribbon Workbench | XrmToolBox

So, to make things even better in Ribbon Workbench, Smart Buttons have been introduced and here’s what they do and how you can get started with it!

Installing Smart Buttons

Initially, you would see this in your Ribbon Workbench, given that you are working on a Solution in Ribbon Workbench for your customization –

  1. You’d see this message for Smart Buttons if the Smart Buttons solution is not installed in your environment.


  2. Once you click the link (https://ribbonworkbench.uservoice.com/knowledgebase/articles/896958), you’ll be taken to the Release notes and you can then click here to find the link to the GitHub page [https://github.com/scottdurow/RibbonWorkbench/releases]


  3. Here’s Scott Durow’s GitHub Page for the Smart Buttons solution – https://github.com/scottdurow/RibbonWorkbench/releases
    The GitHub page also has link to the Unified Client buttons – https://develop1.net/public/post/2018/04/06/Adding-Ribbon-Workbench-SmartButtons-to-the-Unified-Client


    And you can Download the solution shown below –

  4. Now, you can import this in your environment –


    Once this solution is imported, you’ll see this –

  5. It’ll be a Managed Solution (that’s why you don’t need to Publish Customization :))


  6. And when this is imported, you can re-open the Ribbon Workbench and you’ll find the Smart Buttons show up.

Hope this helps!

Here are some Power Automate posts you want to check out –

  1. Select the item based on a key value using Filter Array in Power Automate
  2. Select values from an array using Select action in a Power Automate Flow
  3. Blocking Attachment Extensions in Dynamics 365 CRM
  4. Upgrade Dataverse for Teams Environment to Dataverse Environment
  5. Showing Sandbox or Non Production Apps in Power App mobile app
  6. Create a Power Apps Per User Plan Trial | Dataverse environment
  7. Install On-Premise Gateway from Power Automate or Power Apps | Power Platform
  8. Co-presence in Power Automate | Multiple users working on a Flow
  9. Search Rows (preview) Action in Dataverse connector in a Flow | Power Automate
  10. Suppress Workflow Header Information while sending back HTTP Response in a Flow | Power Automate
  11. Call a Flow from Canvas Power App and get back response | Power Platform\
  12. FetchXML Aggregation in a Flow using CDS (Current Environment) connector | Power Automate
  13. Parsing Outputs of a List Rows action using Parse JSON in a Flow | Common Data Service (CE) connector
  14. Asynchronous HTTP Response from a Flow | Power Automate
  15. Validate JSON Schema for HTTP Request trigger in a Flow and send Response | Power Automate
  16. Converting JSON to XML and XML to JSON in a Flow | Power Automate

Thank you!

Advertisement

Investigating Invalid Arguments errors in Dynamics 365 CRM

In case you encounter errors when working in Dynamics 365 CRM as a Developer, you’ll often see error popups that don’t let you have the option to Download Log File.

And it looks like this –

Now, since you don’t have anything to look at the log, let’s see how we can at least identify what is being called which is throwing this error.

Open Browser’s Dev Tools

  1. Open the Dev Tools by pressing F12 in any browser. In my case, I’m using Chrome.
    Go to the Network tab and clear the logs if needed as shown below.

  2. Now, perform the operation which caused the issue.

  3. And in the Dev Tools, you’ll see it populate

  4. Now, if you expand the one with the error, you’ll see the details of the issue.


Hope this was useful!

Here are some Power Automate posts you want to check out –

  1. Blocking Attachment Extensions in Dynamics 365 CRM
  2. Upgrade Dataverse for Teams Environment to Dataverse Environment
  3. Showing Sandbox or Non Production Apps in Power App mobile app
  4. Create a Power Apps Per User Plan Trial | Dataverse environment
  5. Install On-Premise Gateway from Power Automate or Power Apps | Power Platform
  6. Co-presence in Power Automate | Multiple users working on a Flow
  7. Search Rows (preview) Action in Dataverse connector in a Flow | Power Automate
  8. Suppress Workflow Header Information while sending back HTTP Response in a Flow | Power Automate
  9. Call a Flow from Canvas Power App and get back response | Power Platform\
  10. FetchXML Aggregation in a Flow using CDS (Current Environment) connector | Power Automate
  11. Parsing Outputs of a List Rows action using Parse JSON in a Flow | Common Data Service (CE) connector
  12. Asynchronous HTTP Response from a Flow | Power Automate
  13. Validate JSON Schema for HTTP Request trigger in a Flow and send Response | Power Automate
  14. Converting JSON to XML and XML to JSON in a Flow | Power Automate

Thank you!

Upgrade Dataverse for Teams Environment to Dataverse Environment

Given that you have licenses already in place along with the required Capacity in order to Upgrade from Dataverse for Teams to Dataverse, upgrading the same is an extremely easy process –

Upgrade to Dataverse

In case you have Dataverse for Teams environment and you want to upgrade to Dataverse, here’s what you do in the Power Platform Admin Center (https://admin.powerplatform.microsoft.com/)

  1. Go in the Dataverse for Teams (Microsoft Teams) type of Environment and look for the Upgrade button on the top right corner.

  2. Here’s what the Welcome Page looks like, make sure you understand the operation you are doing as this is permanent and cannot be undone!
    Here’s the detailed Microsoft Documentation on the difference between Dataverse for Teams and Dataverse itself – https://docs.microsoft.com/en-us/power-platform/admin/about-teams-environment?WT.mc_id=ppac_inproduct_env#promotion-process?WT.mc_id=DX-MVP-5003911

  3. Once you clicked on Next, you’ll need to agree to Terms and then confirm the same. Again, this operations is a permanent and can’t be reversed.

  4. It’ll start the process just like any other standard environment change process in Power Platform Admin Center (https://admin.powerplatform.microsoft.com/)

  5. This is how it will look while it is being Upgraded.

  6. This took over 1-2 hours. And once done, your environment will be upgraded.

Hope this was helpful!

Here are some Power Automate posts you want to check out –

  1. Create a Dataverse for Teams environment and add a Canvas App in a Channel
  2. Showing Sandbox or Non Production Apps in Power App mobile app
  3. Create a Power Apps Per User Plan Trial | Dataverse environment
  4. Install On-Premise Gateway from Power Automate or Power Apps | Power Platform
  5. Co-presence in Power Automate | Multiple users working on a Flow
  6. Search Rows (preview) Action in Dataverse connector in a Flow | Power Automate
  7. Suppress Workflow Header Information while sending back HTTP Response in a Flow | Power Automate
  8. Call a Flow from Canvas Power App and get back response | Power Platform\
  9. FetchXML Aggregation in a Flow using CDS (Current Environment) connector | Power Automate
  10. Parsing Outputs of a List Rows action using Parse JSON in a Flow | Common Data Service (CE) connector
  11. Asynchronous HTTP Response from a Flow | Power Automate
  12. Validate JSON Schema for HTTP Request trigger in a Flow and send Response | Power Automate
  13. Converting JSON to XML and XML to JSON in a Flow | Power Automate

Thank you!

Create a Dataverse for Teams environment and add a Canvas App in a Channel

If you are used to creating environments in your Power Platform Admin Center (https://admin.powerplatform.microsoft.com/) and wondering how you can create a Dataverse for Teams environment, you can check this post –

So by default, you cannot create a Dataverse for Teams or (Microsoft Teams) environment in your Power Platform Admin Center and it looks like this

Go to Teams

Navigate to the Teams itself and we will take it from there –

  1. When in Teams, click on the three ellipses and search Power Apps in the App Store within Teams to install Power Apps.

  2. Now, click on Add.

  3. Once this is Added, you can start creating your first App. This will create the Dataverse for Teams environment which you will later see in Power Platform Admin Center.

  4. Once you start, you need to select at least 1 Channel from the list – without which you cannot proceed to creating your first App in the Power Apps for Teams.

  5. Then, I select one of the channel I want the App to be in and click on Create.

  6. Then, it takes a few moments to provision the same. Meanwhile, the Microsoft Teams environment is created in you Power Platform Admin Center of type Microsoft Teams.

  7. The Org looks like this when you click on it as shown above. (We’ll come to this later)

  8. While in Teams, you’ll probably see this – Ignore it or hit Retry.

  9. Once you click on Retry, you’ll see the same Power Apps main page.
    Now, do the below till #13 only if you want to create a new Canvas App in your Dataverse For Teams Environment. Else, you can directly go to the Channel itself to add the app which I’ll show in the next section.
    To create Canvas App – Click on Create an App again and this will open the new Power Apps Studio Editor

  10. And because I see the error in #8 above, I again had to select the channel I want to create my App in.

  11. Now this time, I’m given this Editor where I can mention the name of the App.


  12. App will be created and you’ll see it in Recent Apps in your Power Apps in Teams. It may take a few moments for the Recent Apps section to appear for you.
    Click on Publish to Teams to make the App live to use.

  13. Here’s how the Recent Apps section will display the App you just created.



Adding an App to a Channel

Now, here’s what you do when you want to add an existing App to the channel in Teams –

  1. Now, let’s say that you have worked on your App and that you want to show it on the Tab in a Teams channel, click on Publish button once you are done with Editing the App.


    You’ll see this, click Next if you don’t want to Edit any other details.

  2. Clicking on that, you’ll be asked the channel you want to make this available to.


    You’ll see the Dataverse for Teams environments, then click on the + sign. It’ll then show the Tab on which the App will be shown.

  3. App will be published on that Channel.

  4. In the Power Platform Admin Center, under the Environment, you’ll see the App listed as well.

Hope this was useful! Here are some Power Platform posts you want to check out –

  1. Show only configured Activities Related records section | Power Platform Admin Center
  2. Reflecting Metadata changes in Flow for Dataverse connector
  3. Showing Sandbox or Non Production Apps in Power App mobile app
  4. Create a Power Apps Per User Plan Trial | Dataverse environment
  5. Install On-Premise Gateway from Power Automate or Power Apps | Power Platform
  6. Co-presence in Power Automate | Multiple users working on a Flow
  7. Search Rows (preview) Action in Dataverse connector in a Flow | Power Automate
  8. Suppress Workflow Header Information while sending back HTTP Response in a Flow | Power Automate
  9. Call a Flow from Canvas Power App and get back response | Power Platform\
  10. FetchXML Aggregation in a Flow using CDS (Current Environment) connector | Power Automate
  11. Parsing Outputs of a List Rows action using Parse JSON in a Flow | Common Data Service (CE) connector
  12. Asynchronous HTTP Response from a Flow | Power Automate
  13. Validate JSON Schema for HTTP Request trigger in a Flow and send Response | Power Automate
  14. Converting JSON to XML and XML to JSON in a Flow | Power Automate

Thank you!

Allow users to create App Passwords in Office 365 | Multi-factor Authentication

If you are an Admin User who wish to create App Passwords so that you can use them in your code/web applications so that you don’t have to store credentials in your application? Example: Azure Function you are developing shouldn’t store the password of the User.

At times, you must’ve noticed that why you can’t create App Passwords even when you are having MFA enabled for yourself!

Here’s why –

Scenario

Let’s say the users are logged in and they go to their Office 365 Account where they can add multiple Authentication Methods. Shortcut for that is https://mysignins.microsoft.com/security-info

  1. Once they are in Security Info in order to add new method of Authentication as below

  2. And they don’t get to create an App Password by default.


    Let’s enable users to be able to create their own App Passwords from Azure Portal.

Enforce Users to use MFA

Let’s say the Conditional Access above is already set. Now, you need to enforce users to use MFA.

  1. In O365, go to the User in Active User whom you want to allow creation of Azure App Passwords.

    Select the user and click on Multi-factor Authentication.

  2. Now, in the multi-factor authentication page, you’ll see the users as whether they are using MFA or not.
    As you see below, CRM Admin is Enabled for Multi-Factor Authentication, but not Enforced.

    So, you have to click on Enfore button to enforce the MFA.



  3. Now, when you click on Eforce, you’ll see the below message


  4. After enforcing, you’ll get a success message as below.


  5. Once enforced, you’ll see the below status is updated on whoever this is enforced on.




Create App Passwords from My Sign-ins page

Now that we have enforced the User to use MFA, here’s how you can create App Passwords

  1. As shown in the beginning, try to Add a new method


  2. This time, you’ll be able to see App Passwords as an option to select. Select it and click on Add




  3. Next, you can give a name to the App Password you are setting. You can give it a suitable name keeping in mind the purpose of the App Password you are creating.



    I’ll just give a sample name here since I want to use it in Azure Functions which I’m working on.


  4. And once it is created in a few moments, make sure you copy it before clicking on Done. Else, you can’t retrieve this later and it will be created without you noting it down.


  5. And it’ll be listed among other authentication methods

Additionally, it is recommended to also review setting up Conditional Access policies too while setting up Azure AD Multi-Factor Authentication – https://docs.microsoft.com/en-us/azure/active-directory/authentication/tutorial-enable-azure-mfa?WT.mc_id=DX-MVP-5003911

Hope this was helpful! Here are some more D365 posts which you might be interested in –

  1. Filter records in a View owned by a Team you are a member of | Dynamics 365 CRM
  2. Get GUID of the current View in Dynamics 365 CRM JS from ribbon button | Ribbon Workbench
  3. Dynamics 365 App For Outlook missing on SiteMap in CRM? Use shortcut link [Quick Tip]
  4. Import lookup referencing records together in Dynamics 365 CRM | [Linking related entity data during Excel Import]
  5. Mailbox Alerts Hide/Show behavior in Dynamics 365 CRM
  6. Excel Importing Notes (Annotation) entity in Dynamics 365 CRM
  7. Enable/Disable the need to Approve Email for Mailboxes in Dynamics 365 CRM CE
  8. Call Azure Function from Dynamics 365 CRM using Webhooks
  9. Show Ribbon button only on record selection in Dynamics CRM
  10. Accessing multiple occurrences of a field in Business Process Flow using JS in D365 CRM

Thank you!!

Create a Team, add Members in Microsoft Teams upon Project and Team Members creation in PSA / Project Operations | Power Automate

Let’s take a simple use case where you need to have a Microsoft Team created in Teams and have the Project Members added to the Microsoft Teams’ Project Team.

You can simply do this using 2 simple Flows in Power Automate

Scenario & Setup

If you are a PSA Customer, you would want to create a Team in Microsoft Teams based on what Project it is and then add Team Members of the Project as Team Members in the Microsoft Teams’ Team you created.

Let’s look at a Simple example of how you can do this. And further, you can enhance the implementation yourselves based on whether a Project becomes Inactive, or someone is to be removed from the Project Team.

I’ll be creating 2 Flows for this purpose –

  1. One that will create a Team in Microsoft Teams upon Project Creation and
  2. Other, will add Member to the Project’s MS Team upon addition of the Team Member in Project in PSA/Project Operations.

Create a Team for the Project

Let’s look at the first scenario where you can create a Team in Microsoft Teams once create a Project in PSA.

  1. Flow to trigger off of a creation of a Project.
    |
  2. Now, search for create a team in the next step to find a Microsoft Teams connector’s Action to create a Team in Microsoft Teams.


  3. Assign the Name of the Project and Description of the Project for easy understanding. You can make the team Private which is ideal to keep users’ Teams cleaner and also keeps Project discussions isolated if that’s the need.


  4. Once a Team is created, I’ve created a field on Project record to hold the MS Teams’ ID for other references.

    Add a step to update the Project back with the created MS Teams’ ID like this

    And in that, I’ll update the Created Team’s ID

  5. Now, fetch the Project Manager’s User record in CDS (PSA, basically) so that the User’s ID can be used to make the Owner of the Team you are creating.

  6. Next, you need to add Members to the Team. Look for add a member to the team and you’ll find Microsoft Teams’ action which you can use.

  7. Here’s how the Add a team member looks like.

  8. Now, this is a little tricky. Since you don’t get the Dynamic Values right away in this Action, click on Add a custom item.

  9. In Add a custom item, you can add the Team ID of the MS Team you just created for the Project in step #3 above.

    Once you add it, it’ll look like below

  10. And for the User’s AAD ID step, set the System User’s (fetched in #5)

    Add Azure AD Object ID

  11. Now, the last step looks set.

Add Members to the Project Team

Let’s work on the other scenario with other Flow. This will be on trigger of a creation of a project Team Member.

  1. This second will fire off on creation of a Project Team Member. Hence, the trigger on Create of a Project Team Member.

  2. I’ll get the Project record since I need the MS Teams ID which is a custom field we created to store the MS Team’s ID on the Project.

    Again, you can do this easily if you know how to get related records. I’ve done an extra step for simplicity.


  3. Now, the next step is to retrieve the Bookable Resource‘s Record. In turn, we’ll retrieve the System User record associated with the Bookable Resource record on the Project Team so that the System User’s ID can be used.
    Just because I need the Azure AD Object ID (User) entity, I’ve written a fetch XML on the Bookable Resource entity to go and get the User record’s Azure AD Object ID. I’ll need this to map it in the step where we’ll add the Member to the Project’s created Team.


    My step to retrieve Bookable Resource + System User’s Azure AD ID looks as below. Make sure you select the Bookable Resource GUID reference from the trigger i.e. the Creation of the Project Team Member record to ensure we only get 1 record.

  4. Then, I’ll simply generate a Parsed JSON after the above Step so that I can get to select the required attribute to select in the Team’s Add a Team Member step (Because the related field is not available for Dynamic Values) (In case you know how to directly write using outputs() function, that should be good enough too!!)


  5. Now, add the Team Member to the Project’s Team in MS team. Again, as mentioned above in the previous Flow, use the Add a member to a team Action from Microsoft Teams connector to do so.
    Now, add the Team’s ID in the Team field.

    On the Team field, you’ll need to Add a custom Value like we did in the previous Flow.



  6. And for the final step, in the User AAD ID for the user to add to a team step, you can pick the parsed Azure ID field from #4 above.

  7. As soon as you select from Parse, the Flow step will be converted to Apply to each. But that’s because we used List records which returns multiple values. Even though Apply to each is applied, this will logically run only once anyway!!

  8. Now in the user AAD

Working

Now’s let’s see all this in action.

  1. Let’s create a Project in PSA. Notice I’ll enter the name and the Description since we are creating a Team in MS Teams and that’s what we are filling out. Notice that MS Teams Project ID is blank. Our Flow will populate that once a Team is created in Microsoft Teams.
    Notice that Joe Danny is the Project Manager on the Project, he will be the Owner of the Team we are creating in MS Teams as per our first Flow.


  2. A Team like this will be created in Microsoft Teams.

  3. Also, notice that in the Project in PSA, a MS Teams Project ID will be populated too.

  4. Also, notice that Joe Danny is the Owner of the Team since Joe is the PM on the Project.

  5. Now, let’s add 1 more Team Members to the Project in PSA. Now, I’ve added a new Team Member Priyesh in the Project’s Team.


  6. That team member also get added as Members in Microsoft Teams in the Project’s Team. This is from out second Flow we created to add the Team Members to the created Teams for a PSA Project.


Here are some more enrichments you’ll need to do to handle some scenarios –

  1. Separately handle if a Project is Canceled/Deactivated for some reason.
  2. Remove Members from an MS Teams if they are removed from the Project.

Hope this was useful.

Here are some more posts about Project Service Automation (PSA) in Dynamics 365 / Microsoft Teams that might be helpful –

  1. Cancelled Bookings Imported in Time Entries in Dynamics 365 PSA issue | [Quick Tip]
  2. Task Completion reminder using Flow Bot in Microsoft Teams | Power Automate
  3. Change Booking Status colors on Schedule Board for Field Service/PSA [Quick Tip]
  4. Additional columns in PSA v3 Schedule view
  5. Check Managed Solution failures in Solution History in Dynamics 365 CRM
  6. Modify Project tab’s view in Schedule Board in PSA v3 | Quick Tip
  7. Update Price feature in D365 PSA v3
  8. A manager is required for non-project time entries, absence, and vacation error in D365 PSA v3
  9. Time/Expense Entry Rejection comments in D365 PSA v3
  10. PSA v3 View Custom Controls used on Project form

Thank you!!

Adaptive Cards for Outlook Actionable Messages using Power Automate | Power Platform

Let’s take a look at how you can design Adaptive Cards for Outlook and get response from Outlook users to process using Power Automate.

Scenario

Let’s say I wanted to send an Adaptive Card to an Outlook user on their Email and ask some comment, example – A descriptive feedback and read their response back and send them a confirmation Adaptive Card.

In this post, I’ll simply read the Response in the Flow and send a Confirmation-like Adaptive Card so that you can then further decide to take required action for it based on your use case.

Adaptive Cards Designer – Initial Card Layout

You can logon to https://adaptivecards.io/designer/ i.e. the Adaptive Card designer and start building your card. Below are the high-level steps:

  1. Once you are in the Adaptive Cards Designer, make sure you select the host app as “Outlook Actionable Messages

    You’ll see a sample already created for you which you can start working off of –

  2. Since I want to start from the beginning, I’ll select New Card option as shown below

  3. Now, I’ll start to design my card with the use of some TextBlock, an Input.Text to capture a response. In your case, you can choose the type of input(s) you want. (I’m trying to keep it simple for now 😊)
    These controls works like a drag-and-drop behavior, just drop whatever you need.


    So, I did the following, I added a TextBlock to add the title I want to show on the card and a Multi-line Input.Text to capture a response of the user I’ll send the card to in their Email.

  4. For the Input.Text, I’ve added an id ‘answer‘. We’ll need this when we capture responses back.
    Also, to make the Input.Text control as multi-line, Multi-Line option should be selected as I did below

  5. At this point, our Adaptive Card’s layout is ready. Before we proceed we must first, create a Flow that will capture an HTTP Response and then we’ll come back here.

Flow to Capture Response

Adaptive Cards for Outlook Actionable Messages work off of the HTTP mechanism and that’s why you need a URL where you can capture the responses and send back a confirmation response back.

Let’s call this Flow as “Accept Feedback Response

  1. To do so, first create a Flow that Accepts an HTTP Request. You can refer my other post in order to understand how you can capture HTTP Responses – Accept HTTP Requests in a Flow and send Response back | Power Automate
    Once once you save a Flow that has a trigger of HTTP Response, you’ll get a URL generated, copy it.

  2. Next, I’ll enter the schema by clicking on Use sample payload to generate schema button on the first step above and enter the following schema since I know that’s what is to be expected from the User when they fill in the Text and submit back.

  3. Once you click OK, your schema will look like this.

  4. Collect the result of the above trigger in the Compose so that you can save the Flow with at least 1 Action. (We’ll come back to it later)

  5. Next up, we will also need to setup a response Adaptive Card. This is something that the users will see when they Submit their responses.

  6. It is mandatory to send the response back to the caller i.e. the Outlook in this case. Hence, we’ll send a Response back using Response action in HTTP and send the status code as 200 and header CARD-UPDATE-IN-BODY as true.
    The Body will have the Adaptive Card which we created in step #5 above i.e. the Adaptive Card we have to send as confirmation.

    Here are the details of Refreshing Cards when you send back a response to the client (Outlook user in this case): https://docs.microsoft.com/en-us/outlook/actionable-messages/adaptive-card#refresh-cards?WT.mc_id=DX-MVP-5003911

Complete your Adaptive Card – Add Action

Once your Flow to capture the response is ready, let’s complete the Adaptive Card to add an Action to the same.

  1. Select the card body, you’ll see a button to Add an action

    You’ll need to select Action.Http

  2. Once you select the Action.Http type of Action, look at the Element Properties, you’ll need to enter the URL we got from the Flow we created to capture responses above.

    Here why we chose Action.Http – https://docs.microsoft.com/en-us/outlook/actionable-messages/adaptive-card#outlook-specific-adaptive-card-properties-and-features?WT.mc_id=DX-MVP-5003911
  3. Next, set the title of the Action (it appears as a button). I’ll name it Submit.
    Also, select what kind of Method is to be used for the HTTP Request.

  4. Now, since you’ve selected POST method, you will need to pass the Body. This will be the response which the user will send and which the Flow above will read it as a Response to process the information further.
    Once you select POST, a Body element property will be added where you need to enter the schema and what ID of the element that information belongs to

  5. Remember, the ID for the Input.Text was set as “answer”, we’ll put that here and then it’s Value property. These values should be enclosed in double curly brackets {{ }}.


  6. And also, you’ll need to pass along the Header for Authorization. Read this post by Microsoft – https://docs.microsoft.com/en-us/outlook/actionable-messages/security-requirements#action-authorization-header?WT.mc_id=DX-MVP-5003911
    Add Header as shown below

    Now, as mentioned in the above post, we need to pass the property as Authorization header and leave it blank and Content-Type as application/json

  7. Once all this is done, it’ll look like below in the card payload for the Action.Http part.

  8. Now copy the entire Payload from the Editor and we’ll create a new Flow that will be used to send the Adaptive Card to the user.

Flow to Send the Adaptive Card in Email

I’m creating a Flow here which will be used to send the Adaptive Card. To keep it simple, I’m just triggering it using a button on-demand. Your use-case will vary.

Let’s call this Flow as “Send Feedback Request

  1. Wherever you need to create the Adaptive Card, you’ll need to paste the entire Payload copied from the step above in a Compose step

  2. I’ll add a step to send an Email directly using Send Email and make sure you enable the </> part for the body.


    Make sure the Outputs of the Compose we pasted above in Step #2 are enclosed in
    <script type="application/adaptivecard+json">
    </script>

Working

Let’s look at how this will turn out!!

  1. Let me just Run the Flow as is so that the Adaptive Card is generated and sent to the user I intend to in the Email.
  2. They’ll receive an email like this

  3. And the user will submit the answer in the text box and submit.

  4. Once they submit, the Accept Feedback Response Flow we created will be triggered

  5. And the response is available to be read and processed further in the Compose step we created to collect it with the defined schema.


  6. The Adaptive Card we had created to send back as confirmation (which looks as below) will be sent

  7. Once the user submits, they’ll get the below Adaptive Card as a confirmation that their feedback has been taken.

And that’s how you can make your Adaptive Cards to function with Outlook!! Hope this was helpful.

Here are some superb posts on Adaptive Cards –

  1. Microsoft Message Cards – The Ultimate Guide by Thomas Poszytek – https://poszytek.eu/en/microsoft-en/microsoft-message-cards-the-ultimate-guide/
  2. Multi line Approvals with Adaptive Cards, Outlook and Power Automate by Yash Agarwal – https://www.bythedevs.com/post/multi-line-approvals-with-adaptive-cards-outlook-and-power-automate
  3. Custom Actionable Messages with Microsoft Flow series by Rik-de Koning (3 posts) – https://www.about365.nl/category/blog-series/custom-actionable-messages-with-microsoft-flow/

Here are some more Power Automate / Adaptive Cards posts you might want to look at –

  1. Adaptive Cards for Teams to collect data from users using Power Automate | SharePoint Lists
  2. Task Completion reminder using Flow Bot in Microsoft Teams | Power Automate
  3. Make On-Demand Flow to show up in Dynamics 365 | Power Automate
  4. Run As context in CDS (Current Environment) Flow Trigger | Power Automate
  5. Using triggerBody() / triggerOutput() to read CDS trigger metadata attributes in a Flow | Power Automate
  6. Terminate a Flow with Failed/Cancelled status | Power Automate
  7. Call HTTP Request from a Canvas Power App using Flow and get back Response | Power Automate
  8. Setting Retry Policy for an HTTP request in a Flow | Power Automate
  9. Send a Power App Push Notification using Flow to open a record in Canvas App | Power Automate
  10. ChildFlowUnsupportedForInvokerConnections error while using Child Flows [SOLVED] | Power Automate
  11. BPF Flow Step as a Trigger in CDS (Current Environment) connector | Power Automate
  12. Pause a Flow using Delay and Delay Until | Power Automate

Thank you!! 😊

Variables in Canvas Power Apps | Global and Context

For all newbies, being able to use Variables is one the most curious questions put out immediately. Here’s a simplistic example of using Variables, both Global and Contextual in this post.

headerImg

Global Variable

Global Variables as the name suggest, run through the entire App itself and can be changed and altered when needed.
Global variables can hold boolean, string, number etc.

  1. Let’s say, I have a Text field called GuestNameField
    guestFieldAdded
    guestNameFieldView
  2. Global Variables are created and set by using Set(variable, value) function.Now, on the OnChange event of the GuestNameField above, I’m setting the variable by the formula Set(guestName, GuestNameField.Text). Where, guestName is the field I created on the fly and I’m setting the text from the GuestNameField textbox whenever the Textbox will trigger OnChange Event.
    formulaWritten
  3. And I have a Label called as DisplayValue which will read from the variable and set it’s text.
    readFromVar
  4. Now, when I run the app and type the name, and when I release the focus on the text box, the
    typeName
    And when the focus from the TextBox is released, OnChange of the TextBox will trigger and the Label will display the text written since it’s reading the value from the variable
    appear

Context Variable

Now, a variation to the Context Variable from the Global Variable is that the Context variable have the scope of the only the current screen they are declared in. Navigate function is also a form of Context variable in which case, you can pass values to other screens.

Context variables can hold strings, numbers, records and tables.

  1. Now, in case of Context Variables, you use UpdateContext({variable: value}) in the formula.
    contextVar
  2. And is accessed/read by simply writing the name of the variable directly
    directContextVarName
  3. And it behaves in the same way, you write something and it can be read
    typeName
    And displayed below as seen in the above Global Variable example
    appear

Checking your Variables

In case you’re wondering you’ll lose track of your variables, you can check the File menu and access the Variables section as shown below
menuItem

Global Variables as marked above can be accessed in their own section
globalStored
And if you open any of those, you can see and even navigate to where they are used.
globalUsage

Similarly, for Context Variables are denoted by the Screen names they are in.
contextStored

I tried to summarize this on a high level. You can refer this Microsoft Documentation for details Understand canvas-app variables in Power Apps.

Hope this was easy!

In case you are looking for more post related to Canvas PowerApps, here you go –

  1. Get N:N records in a Canvas Power App using Common Data Service connector | Power Platform
  2. Adding a Canvas PowerApp to Teams
  3. Correctly connect to an Excel file in a Canvas PowerApp
  4. Sending Image from Canvas PowerApps to SharePoint Document Library using Flows

Thank you!

Dynamics 365 PSA v2 to v3 Upgrade failed? Here’s what to do.

This is a little tricky upgrade from PSA v2 to PSA v3. I’m sure by this time of the year, most of you must have upgraded and this post by me comes a little late than it should.

Here’s my experience and what help from Microsoft Support I needed to complete the Upgrade successfully.

So usually, this is what you expect when you initiate the upgrade process. You go to the Instance Picker from Dynamics 365 Admin Center.
upgradeButton

And you can see that you are on PSA v2.4.x version and the New version available is 3.10.x. When you kick off, it starts running
upgradeInProgress
But, it fails like this.
installFailed

Let’s take a stab at it!

I usually prefer to go with the old school classic Instance Picker, if you want to have a quick access to it, check this post – D365 Admin Center: Instance Picker Link

Solution Health Hub

Note: Please be aware that below mentioned steps that involve Project Service & Project Service Upgrade Rule Set can only be provisioned by Microsoft Support and we need to create a Support Request with Microsoft for them to provide this Rule Set. These comes in a Managed Solution Microsoft Support installs from their end into your environment.

  1. Assuming Microsoft Support has enabled this Rule Set for your organization, you can go to Solution Health Hub
    createNewAnalysisJob
  2. Then, select either Project Service or Project Service Upgrade
    ruleSet
  3. It will automatically run asynchronously as and when you create it. It should display results in a few moments.
    failedValidation
    In this case, my failures were that Resource Requirement records didn’t have Hours & Resources were not filled in. Some Project Tasks didn’t have Project attached to them which resulted in corrupted PSA data according to the Rule Set and hence, the upgrade fails.
  4. Now, in my case, I cleaned this data manually. Post that, I created another Analysis Job to ensure that there are no more failures.
    passedRuleSet
    Also, there’s another Rule that isn’t mentioned here but is a reason for failure. That is – Project Name (msdyn_Subject) should NOT be Blank. Use Advanced Find to find these records and correct manually.  Please ensure this manually as it won’t appear here. 
  5. Now, there’s a workflow called as Update User Work History. It should have shown 3.3 or higher in the version to select, unfortunately, this will come once the upgrade fails 1 time.
    oldWF
  6. Now, you are all set to kick off Upgrade Once again. It will fail due to the incorrect workflow mentioned above in #5.
    installFailed
  7. Now, you can go back and check that workflow, it should have the correct version appearing (due to the partial upgrade that happened in #6 above, which eventually failed)
    updateUserWorkHours
    Set this to 3.3 and Activate the workflow again.
  8. Now, trigger the Update to PSA v3 one more time. And this time it should go through correctly.
    installedPlease note, due to constant upgrades in the platform/PSA, there could still be some undetected issues which could result in failure. Hence, I tried to put what I experienced in general.

    Post this, also ensure that all SDK Message Process Steps and related Workflows related to PSA are enabled.

In case you are also looking to find out about dependencies about failed Solution Upgrades, you can check this post too – Check Managed Solution failures in Solution History in D365 CE

Hope this helps!

Dynamics 365 Solutions’ New Experience in Power Apps, Solution Checker and more

If you’ve recently noticed Settings > Solutions area in Dynamics 365, you’ll see a notification that this has been moved
alertNotification

And you’ll be redirected to Solutions Area in Power Apps –
newArea

Solution Checker

Solution Checker is a helpful feature where it runs a validation of components in the Solution itself –

  1. If you see for your custom Solutions, if you haven’t ever Run a check on the solution, the status will be Hasn’t been run
    checkNotRun
    I’ll zoom it below –
    statusZoomed
  2. Now, you can run the Solution Checker against your entity to find potential issues and add/remove component that matter.
    selectRun
  3. Once the Run starts, it will show the status of Running… for the solution as well as in the Power App ribbon.
    running
  4. Once the run is complete, you can see the time stamp it completed on and also View/Download the results –
    runComplete
    viewResults
  5. You can see the results as below –
    sampleResult1
    So basically, it’ll show what best practices should be followed in order for the Solution to be meeting highest standards of configurations and customization.
  6. Another example from another solution is this –
    removeDebug
  7. Or something like – under Upgrade Readiness category
    upgradeReadiness

    Full details can be found here on Microsoft’s official document – https://docs.microsoft.com/en-us/powerapps/maker/common-data-service/use-powerapps-checker#review-the-solution-checker-report

Solution Export Versioning

Now, every time you export a solution, by default it is set to Managed unlike Unmanaged in the Classic UI.

Also, notice the Version number is auto-incremented to x.x.x.1
defaultBehavior

And in further exports, the version keeps on auto-incrementing
incremented

Hope this helps!!