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!

Advertisement

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.
Here’s Microsoft’s Current Environment connector’s official Docs – https://docs.microsoft.com/en-us/connectors/commondataserviceforapps?WT.mc_id=DX-MVP-5003911

Hope this helps!

Easier template selection & Manage Activities with ease in Dynamics 365 | 2020 Wave 1 Feature

Easier template selection and a improved Activities management view are pretty important features that got added in this 2020 Wave 1 Early Access. Here’s what they are!

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.

Easier Template Selection

Now, you can preview how the Email will look like before you select the template in the Activities
First, you need to click on Insert Template once you select the recipient of the Email
insertTemplate

And you can preview what each applicable template will look like before making the selection
previewInNewUI

And when you select Apply Template, it was applied to the actual email.
oldPostSelection

Please note that this is only in Dynamics 365 and doesn’t translate the same to Dynamics 365 App For Outlook’s Add Template feature. By the way, if you’re looking to set up D365 App For Outlook, please check these related posts –

Summarizing D365 App For Outlook Setup in 3 steps with Exchange Online mailbox

Using Templates from D365 CE in D365 App For Outlook

Old Template Selection

Old Template selection was just selecting the Template itself and you had to rely on your knowledge of what template to use from your system
oldSelection

Manage Activities with Ease

Now, with the 2020 Wave 1 Updates, you can now manage your Activities with ease. Simply by going into Activities, you can directly choose how you want to filter what Activities should be seen instead of going into several branches of Views and then making the selection.

newActivitySelection

Now, you can filter by the Due Date of the Activity, by default is set to All so that All Activities show
dueAll

 

And you can also select what type of Activities you want to see by selecting from Activity Type
activityType

These very simple yet powerful features are sure to make your work around Activities area a lot better. 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!!

Kanban view in Dynamics 365 Sales | 2020 Wave 1 Early Access Feature

Kanban View in D365 is another desired feature for Dynamics 365 Salespeople is here in the 2020  Wave 1 Early Access feature-set!

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.

Enabling Kanban View

  1. Navigate to Opportunities and open the My Open Opportunities view
    openOppView
  2. Then, select Custom Controls to change to a Kanban view
    selectCustomControls
  3. Select Kanban and make sure it’s selected for all device types
    selectKanban
    clickOK
    Finally, just Save and Publish.

Using Kanban View

Now, once changes are published, on your My Open Opportunities view (you should already see it in Kanban). If not, select the Show As to show Kanban as an option and then select Kanban.
showAs
selectKanbanFromView

Once done, you can select the Kanban type i.e. based on Business Process Flow or based on the Stage of the Opportunity.
toggleType

How to Read the Kanban View

In the below, screenshot, the value denotes the total of the relevant Amount in that stage. Say, total of Estimated Revenue when an Opportunity is Open and the one on the right denotes total records that can be currently seen against how many records are actually present in that stage
howToView

Based on Status

Now, the Kanban view based on Status will let you move your Opportunity between two statuses. Say, in this example, the status is in Open, you want to mark it as Won.
dragStatus

And when you drop it on the Won status, the Opportunity Close dialog will appear where you can just fill in the required information and just close.
dialogToFill

Based on Business Process Flow

And in Business Process Flow type, you can just move the Opportunity between different stages of the BPF

bpfType

Moving the card to either direction will open up the actual record itself to make the final change.

Hope this post helps you get started!! 🙂

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!

Check Managed Solution failures in Solution History in Dynamics 365 CRM

At times, solution upgrades failed for Managed solution and you have to get in touch with Microsoft support to figure out and get this through –

Example: You’re upgrading a solution like Project Service Automation (or any other for that matter)

Solution Failure

installationFailed

Solution History

So, instead of directly opening a support ticket with Microsoft, it’s best to dig a little into Solution History to get an insight of what exactly failed and to see if you have a quick resolution for this yourself-

  1. Navigate to Solution History in Settings in D365.
    solutionHistory
  2. Switch the view to see All Solutions
    switchView
  3. And open the one that failed recently
    openFailed
  4. In my example particularly, I found the below component had a conflicting dependency which caused the solution to fail-
    dependentComponent

Checking in Dependency Viewer

Now, this isn’t very subtle to check the Dependency Viewer –

  1. In the Exception error message, right click the solutions layers link from the error message itself. Use the scroll wheel itself to click on the link instead of clicking or right clicking.
    openSolutionLayers
    In my case from the above screenshot, the issue was that the managed workflow Update User Work History was set to Draft and hence, the upgrade failed. It could be anything else in your case.
  2. If this doesn’t open in a new window and opens in the new tab with some additional characters in the URL, then trim the beginning and ending of the text in the bar to make it a legitimate URL and press enter
    trim1

trim2

Post this, you’ll need to work your way to fix the solution and then try upgrading again.

So, if you have a particular solution like restoring back the missing component or fulfilling whatever the dependency may be, you can retry upgrade and this should work successfully.

Finally, if things don’t work out, it would be best to open a support ticket with Microsoft and they should help.

Apart from this, there are still failures which unfortunately, only Microsoft could tell. Those are usually the ones that happen due to data as Microsoft Support said. I’ll follow up this blog in the future once I uncover more details.

Hope this 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!!