Show Loading Screen in Dynamics 365 using Client API reference

Suppose, you want to show a loading/waiting screen to let people know there’s some heavy processing going on in the back-end and they shouldn’t navigate away to do anything else with the record, you can use loading screen by using showProgressIndicator() and closeProgressIndicatory() methods.

Xrm.Utility methods

There are 2 methods are documented in the Xrm.Utility of Microsoft Docs that you can use to achieve this. Microsoft reference here.

In this scenario, let’s say you want to show the Loading page while your Action is being performed by the JavaScript code.

  1. You can place the Xrm.Utility.showProgressIndicator(message); before you begin your code to invoke an action and place Xrm.Utility.closeProgressIndicator(); in your success and failure messages.
    codePositions

Execution

Whenever your JS code will call the action, the progress message will be displayed on the screen as below  –

In Classic UI
clasicMessage

 

In Unified Interface –
UCIMessage

 

And once the process is complete, the Xrm.Utility.closeProgressIndicator will remove the message as below and bring back the form you were working on –

messageOver

Side Note: If you are using action calling from JS using invokeProcessAction, as of the day of this post – This doesn’t work well and results in action not supported error on the UCI – invokeProcessAction does not work in UCI

 

Hope this helps!

Create a To-Do List Item of Important Outlook Emails using Power Automate

Since Power Automate is so powerful that you can creatively use it to improve your productivity at work. Here’s an example of how you can utilize a scenario where you need a quick checklist to make sure you respond all important emails for the day.

Power Automate

  1. You’ll need to create an Automated Power Automate and select the trigger as Office 365 Outlook. Select ‘When a new email arrived (V3)’ from the same and make sure you only select the High Importance marked emails
    selectOnlyHighImp
  2. Next step, create a To-Do Item. Select the List you have created. In my case, I created a separate list called ‘Respond Important Emails’
    toDoList
    And the step to configure the To-Do List item should be like this –
    addToDoStep
    In the above picture, I’ve made sure I select the correct List I want to create a To-Do in.

    And to give myself some time, I’ve added a reminder time of 2 hours from the time this Flow/Power Automate will run i.e. when the email will come in –
    add2Hours

How it works

Now, when an Important email will arrive in my Inbox as below –
actualEmail

Power Automate will create a To-Do in my created List
newItemAdded

And it will look like this –
reminderIn2Hours
Also, the reminder is set to remind me 2 hours post the time the To-Do item was created. Just in case I’m into something else, I’d set myself a reminder.

Hope this helps! And you can use your creativity to improve your productivity!

Custom View Filter JS code not working in Dynamics 365 CE. Why? [Quick Tip]

One of the major pet-peeve is not understanding why the code isn’t working. And you for sure know you’ve written the correct code. But, thing just don’t work.

One such tricky situation is that of applying custom filter to fields using JavaScript in Dynamics 365 Customer Engagement apps.

Scenario

Let’s say you have a custom filter to be applied to a field and you’ve written your JS code on Load to apply the filter and everything (you know what you need to do!)

Example:
defaultCode

But the above is just not working. Why???
contactNotWorking

Reason

The reason is pretty simple! Because, the Lookup field is still using the one set on the field itself. Check that –

onFieldFilteringOn

 

The above should be turned off to make your code work since the field’s default OOB filtering takes precedence.
turnedOff

And now, your code should work (Provided everything in it correct)

working

 

Hope this quick tip helps!

Selecting (Current) in Environment in Power Automate CDS connector and why it matters

If you’re new to Power Automate, you must be wondering why am I given an option to select either (Current) or the actual name of the environment. Why can’t I just select the actual name?
selectEnv

Well, here’s why –

Importing into Other environments

So, when you import your Flow / Power Automate into other environment using a solution, be it from Sandbox to Production or to entirely different org in different tenant, here’s the behavior

(Current) selection

currentSelected

And if you Export this Flow and import into other Organizations, you can simply restore the connections to that organization by simply selecting the connection
authenticateCurrent

And it will be loaded with the current environment(s) as it was on the source environment
currentLoaded

Environment selection

Whereas now, if you have exported the Flow with Environments selected as the particular environment and not (Current) like below –
envSelect

When you import this into other environment, and when you try to authenticate, it will not go through and you’ll see something like this –
corruptedEnv

And if you wonder what the Org name is displayed in the picture above, it’s the Org Unique Name of the source environment
uniqueNameOfOldOrg

 

And that’s why, it’s critical to select (Current) environment when you develop flows and you know you want to have these imported to other environments.

Hope this helps!

Hide Custom Ribbon Button [Easy Way] – Ribbon Workbench

Ribbon Workbench – At times, you have some custom ribbon buttons in place. And you don’t really want to delete it and lose the configuration, but just hide it temporarily. Here’s what I usually do!

So, this is your custom button called Promote on the Account form, for example.
customButton

And you want to temporary hide it. And you can’t simply right click and select Hide.

customOptions

Just like you can simply right-click and select Hide on any other OOB button and your job is done
OOBHide

 

Enable Rule Command

  1. Add a Display Rule to the Command attached with the button you have.
    addDisplayRule
  2. Now, select Value Rule in the Display Rule section.
    addValueRule
  3. And simple Invert Result = True
    invertResult
  4. And your button is hidden!
    buttonHidde

Hope this quick tip helps!! Cheers!!

Unified Interface App URLs – 3 different ways

Couple of different ways you can generate/get your Unified Interface App’s URL from. And another one if you want to go an unusual way –

Additionally, if you’re also looking to change the App Icon for Unified Interface, check this – Change the Unified Interface App Icons

App ID Method

This being the easiest and most obvious way to save your App URL when you create a new Unified Interface app –

whileCreating

Or when you’re in the App Designer, look for the Properties of the App itself and in the bottom, you’ll see the URL, you can save this too –

inAppDesigner

So in this case, your URL is – https://<orgname&gt;.<CRMRegion>.dynamics.com/Apps/uniquename/<AppUniqueName>

App Suffix Method

This is another easy way to create your Apps URL. You can get it when you open the Manage Roles option in My Apps and open the same.

Open Manage Roles –
openManageRoles

And in the right hand pane, you can set the App Suffix
addAppSuffix

In this case, your App Name will simply be – https://<orgname&gt;.<CRMRegion>.dynamics.com/apps/<AppSuffixName>

Once you add an App Suffix, the same can also be seen in the Properties as well in the App Designer and the URL Interface URL will be the one with the Suffix Name unlike the one without Suffix in the first method above.
appSuffixAdded

GUID Method

This is not the best way to save or use an App URL, but if you’re interested, here we go! 🙂

You can use this URL – https://<orgname&gt;.<CRMRegion>.dynamics.com/main.aspx?appid=<GuidFromAppDesigner>

You can get the GUID part from the App Designer itself –

guidPart

Obviously, this is not recommended but I thought I’ll share anyway.

Hope this helps!

Save generated PDFs to SharePoint directly – 2020 Wave 1 | Early Access Feature

With Wave 1 of 2020, Early Access lets you use fantastic features in Dynamics 365 CE. For Sales customers, this little feature will definitely be a delight!

Disclaimer: Before we proceed, please note that this is a part of the Wave 1 2020 Early Access. We can’t be sure if this will make it to the final release. Also, you can enable Early Access into your Sandbox instance only and test since it’s not recommended for Production at this point.

Let’s start! Till now post Wave 2 2019, you were able to generate PDF Documents from the Document Templates you created for entity records. You can now take it a step further by having to choose between just downloading the file or Saving it to SharePoint directly behind the record.

Pre-Requisites

  1. SharePoint Integration enabled in D365
  2. Generate PDF option enabled for the entity record you want this feature on.
    If you are looking to enable this feature, check this post – Create & Send PDFs from Word Templates for Quotes in D365 CE Wave 2 Updates
  3. Wave 1 2020 Enabled for your Sandbox Organization.

You don’t need to perform additional settings for enable/disable this feature.

Creating PDF

  1. Just as you used to create a PDF from Wave 2019 updates, you need to do the same.
    createQuote
  2. And you’ll be prompted if you want to also save it to SharePoint.
    saveRec
  3. Once successful, you’ll see that it was saved to SharePoint.
    savedToSP

 

Saved to SharePoint

You can check the Documents grid, the Document will be attached there –
DocView
onSP
In this scenario, it won’t do both -Download and Save to SharePoint.

Hope you find this feature helpful!

Additional columns in PSA v3 Schedule view

A simple and most common questions asked are if we can add more columns to the Schedule view in D365 Project Service Automation v3. Well, yes! And it’s pretty simple too.
So, out-of-the-box, this is what you see on the Schedule view
OOBView

Adding Field to the Schedule Control

  1. PSA v3 out-of-the-box has all these custom controls put up on the Project form. So for Schedule, the custom control used is cc_ProjectTaskControl
    projectTaskControl
  2. Now, notice that the CC_ProjectTaskControl uses AdditionalColumns in the Property as seen in the screenshot above. Let’s go to that View in D365.
    So, under Project Task entity, look for the AdditionaColumns view –
    additionalColumnView
  3. Let’s say you have a custom field called Task Code that you want to add to the view, add it like you would add to any other view in Dynamics CRM.
    addToView
  4. And alongside Category, you’ll see your extra field. Publish the changes.
    added

Field on Schedule

Now, by default, the field will appear in the Schedule View – However, if it doesn’t render correctly, try refreshing the page once more –

extraColumnAdded

Glitch I found

Once I manually hid the extra column I added, I could see the it should go to the Add Column column, the last one. However, I see that it doesn’t render the name of the column you added correctly and shows something like this –

littleGlitch

Additionally, if you hide the column and refresh the page again, it doesn’t save the last state as it. It’ll show your column again, and in compressed form
compressedGlitch
Hope this quick tip helps!!

Button Flow in Power Automate to replicate a Quick Create Form in D365 CE

I wanted to try a quick example of a Flow Button. I thought, why not make a simple Quick Create like form to enter data in Dynamics from Flow itself? So here’s a little form I did –

Create Button Flow in Power Automate

Now, let’s start of by creating a Flow button itself.

  1. Choose the template to create a Flow button.
    createFlowButton
  2. And give a suitable name and select the Flow trigger which is a button
    createAccountNew
  3. Now, select what input controls you want to add to the Flow Button. Click on Add Input and then select the Input you want to start off with
    addInput
    chooseControl
  4. Now, since in this example, I’m trying to create a simple Quick Create like form for D365, I’ll choose the most obvious fields I want and create the inputs as below
    buttonLayout
  5. Further, I’ll connect the same to CDS and Create a record in Dynamics using the input I receive from the Flow button, so – my CDS mapping in the Flow below looks like this –
    upperFlowBody
    I’ve mapped the Company Name and Annual Revenue fields.

    And now, I map the remaining Email address field to create my record.
    lowerFlowBody

    My Flow is now ready and after testing it, I’m ready to use it on my phone.

Run the Button Flow on Phone

On the phone app, make sure you have access to the Flow and navigate to Buttons on the screen-

  1. In Power Automate app, open the Buttons section and check for the Flow Button you created – Create Account in this case –
    buttonView
  2. Once you push the button, you’ll see the form you created with the input fields
    blankForm
  3. Finally, when you fill out the form, you’ll simply need to hit Done and that should be it.
    readyToSubmit

 

Check the Record in D365

Now, if you check in Dynamics, the record must’ve been created already!
record

 

Hope this quick tutorial helps!!

Adding a Canvas PowerApp to Teams

Let’s take a look at how you can simply export the Canvas App from your Organization and import it to Teams. And you should be good to go!

Exporting Canvas App

  1. Assuming you are an Admin and you have Owner/Co-Owner rights to the App, you can click the ellipses part on the App and look for Add to Teams option.
    addToTeams
  2. Once done, you can check on the right hand-side to see some details and Download the zip file of the Canvas App when ready
    downloadApp
  3. And that’s it, it gets downloaded like any other Model Driven/Canvas App solution file.
    downloaded

 

Importing App to Teams

  1. Now, you can import the same as a custom App in Teams. Navigate to the Apps section and look for Upload a custom app in menu as shown below.
    uploadACustomApp
  2. Now, chose the Org you want to import the solution file to. In my case, it’s just one organization, you may have multiple.
    selectOrg
  3. A dialog box will pop up to ask you to select the solution file, navigate to the saved location and pick the file.
    selectSolution
  4. And you’re ready. The App has been imported. You can see it in the Apps section under Built for CFT 146.
    findAppOnTeams

 

Adding App Per User

Each user needs to add the App themselves in order to be able to access it.

Also, remember that the user who is adding the App should have rights to access the App itself i.e. the App should be shared with those users.

Let’s say Kuldeep is another user in the CFT 146 Organization. He can explicitly search for the App and add it as below –

  1. Go to Apps, then look for the area, Build For <Org Name> and then look for the App that was imported.
    Attendees AppfindAppOnTeams
  2. Click on the App, and the dialog box will provide with a button to Add to Teams, along with other details mentioned alongside.
    clickAdd
  3. Once added, it will appear next in the left navigation menu and you can simply run it by clicking on it.
    appRunning
  4. In case the user doesn’t have appropriate rights on the App, they will see this message when trying to open the App in Teams.
    errorInAccessing

Hope this helps!! Happy 365ing!