Showing posts with label Power Apps. Show all posts
Showing posts with label Power Apps. Show all posts

Sunday, September 15, 2024

D365CE | Alternative to Input Mask PCF control

It's been quite a while since the input mask PCF control has been retired in Dynamics 365 CE.

I recently had to implement a mask on phone number fields and was disappointed to learn that Microsoft had retired the control and hasn't offered any alternatives.

So I had to look for other options and I came across this Check Phone Number PCF control which I found it to be very comprehensive. You can read the full documentation on github.

Steps and options to configure

  • Once you download and import the solution, you can select the field on which you want to enable the component.
  • The Output format helps you transform to the following:
    • International: +91 87855 85545
    • National: 87855 85545
    • E164: +918785585545
Note: I prefer the E164 format. Sure it isn't readable, but it is easier during search because it is impossible to remember the correct format for all the country codes. Having said that, it depends if you're implementing this for only a particular country, then an International or National format could work better for you.
  • You can setup the default country code. When you enter the number without any code, a default country code is automatically setup.
  • You can also setup a list of allowed and excluded country codes. To setup the allowed country codes, you can follow the list here or check the screenshot for an example: ISO 3166 (alpha 2) country codes needs to be used.
  • You can also specify whether you want to phone call button to be shown and which app must be the default calling app.

Here are some sample numbers I have entered for UAE, Italy and India.



Hope this helps!

Wednesday, June 19, 2024

All about Addresses in Dynamics 365

We had a requirement regarding addresses that had to be addressed in Dynamics 365 CE. I thought to share it.

Requirements

  • To be able to select the following fields as a dropdown, preferably a lookup. Fields: District, City and Country because the District and City list may continue to expand in the future.
  • To be able to add multiple addresses against the Account. 2 or more.
  • In case we need to update an address, there must be a provision in the Address table to select the District, City and Country as well. i.e., these fields must be available in the Address table as lookup fields.
These requirements sound simple to implement, however the address entity lacks flexibility due to which we had to think of a workaround.

Things I have learnt about Addresses

  1. On the Account we can add maximum 2 addresses. Address 1 and Address 2. Let's call this embedded address. If we need to add a 3rd address related to an account, we need to create a new address record (in the related system Address table).
  2. While the Country and State fields are available, these are text fields in the embedded address and related system address table.
  3. The related address table is non-customizable. We cannot add additional lookup fields in that entity.
  4. When an Account or Contact record is created, blank Address records are automatically created and linked to the Account (or Contact). These are associated with the embedded address records and are numbered as "addressnumber" 1 and 2. addressnumber 1 represents invoice address and 2 represents delivery address by default.
  5. The system Address tables don't have lookup to Account or Contact. The relationship is identified by 2 fields namely, "objecttypecode" and "parentid". objecttypecode recoginzes if this related address is linked to "Account" or "Contact" and parentid is the actual GUID value of the Account or Contact.

Workaround to address the limitations

Since the system Address entity is linked and tightly integrated in Dynamics 365 CE, we couldn't replace the system Address table with new custom Address table. I am saying this because, system Address primarily linked to Account and Contact, but when we update the address on Lead and qualify it, the embedded Address and correspondingly the system Address records are also updated. Also, indirectly linked with Opportunities, Quotes and beyond. If you're considering dual write integration with Dynamics 365 F&O, these are again tightly integrated there.

Having analyzed this, we went ahead with a custom Address entity but ensured we are keeping the system Address entity records in sync as well.

What did we do?
  1. We created 3 custom lookup fields called District, City and Country on the Lead, Account and Contact tables for easy data entry from users perspective. When the user selects these fields, we populate the OOB District, State and Country text fields and those are automatically updated in the related system address records.
  2. We introduced a custom address entity and ensured the user uses this for their data entry and viewing. When the user updates the embedded address, we also need to create custom address records related to Account.
  3. When the custom address records are updated, we need to update the related system address entity records.
  4. When a new custom address is created, we create a related system address entity record and link it with the respect Account by updating the objecttypecode and parentid.
  5. When the custom address is deleted, we need to also delete the related system address record and update the embedded addresses if the addressnumber matches. By update I mean we had to clear the values in the embedded address fields on the Account record.
  6. For the most part we can treat system Addresses as a target only, as they are a copy of the custom Address entity data. We can set up a business process and data entry process in such a way that system addresses are not updated, however, if some process we don’t know about updates a system Address, it needs to get reflected up to the custom Address as well.
Hope that helps!

Tuesday, March 19, 2024

D365 CE | Preferred solution in Dataverse

Interesting concept that I recently came across is to "Set your Preferred Solution" in Dataverse.

By default if you do any unmanaged customizations in PowerApps Maker, are created under the default solution. The drawback is if I add a new field, instead of using the prefix for the solution that I have created, it would use the Common Data Service Default Solution prefix (i.e., new_ or cr_).

Microsoft has now provided an option to setup your preferred solution, so any customization you perform even outside your custom solution will automatically be added under your custom solution. To do so, we need to setup the custom solution as a Preferred Solution.

Here are the steps:

  • When you login to PowerApps Maker, you can see there is an option to select the preferred solution.
  • Click on Manage or click Set preferred solution.

Set up preferred solution in Dynamics 365 CE PowerApps Maker

  • Select the solution from the dropdown or create a new solution.
select the preferred solution from the dropdown list

  • Once the preferred solution has been setup, you can test by going to the default solution and creating a new field or updating the character limit of an existing field. You will notice that the changes are automatically reflect in the preferred solution too.


Hope it helps!

Monday, March 13, 2023

D365 CE Preview Feature (Collaboration and Co-authoring)

One of the most common ask from our customers is, does the app block one user from accessing or making changes to a record if another user has opened the record on their screen?

While this is not quite like restraining a user from updating a record because of multiple users accessing it, this feature does allow you to see the other folks that are collaborating on the same record.

You’ll need to enable this in your environment to take advantage of this feature.

  • Open https://admin.powerplatform.microsoft.com
  • Select the environment where you want to enable the functionality.
  • Click on Settings on the command bar (located on the top of the screen).
  • Expand the Product section and select Features.



  • Scroll down to Collaboration section on the left side of the screen.
  • Turn on 'Show other people when they're using the same form'.
  • Now when 2 or more users access the same form, you'll see the co-presence indicator showing all the users. It is very similar to what we see on Microsoft 365 Apps (Word, Excel, etc.).
  • This is only enabled for Account, Contact, Opportunity and Case forms during preview.



Here I would also highlight 2 other features that you can enable.
  • You can also see you can initiate a Teams meeting directly from appointments. For that flip the switch 'End users can add and join Teams meetings from appointments in model-driven app' under the Collaboration section.
  • There is also co-authoring for model-driven apps where you can see the users making changes to forms, views or dashboards using the power apps maker portal. With coauthoring you can see who is working on the same app at the same time, and you can see their applied changes in real-time.
Interesting!

Monday, December 27, 2021

Set a view as a default view in D365 CE [System User]

With the recent and frequent updates on D365 CE, there are many subtle changes that go un-noticed. The one that I noticed was to be able to setup a view as a default view by a business or system user rather than system admin.

Here are the steps:

  • Suppose this is my default Accounts view (Active Accounts) and I want to change it to "My Active Accounts" view.


  • Select "My Active Accounts" View.

  • Scroll down to the bottom of the list of views and select "Set current view as my default"

  • Now there would be a mention of "Default" near "My Active Accounts" view.

Hope that helps!



Sunday, September 1, 2019

Contains Data action using Microsoft Flow

A lot has changed in the way Dynamics 365 workflows are created and this is the first of many posts to follow. One of the most common actions that we perform on using Workflows in Dynamics 365 for Customer Engagement is to check a condition, if a record field "Contains Data" or "Does Not Contain Data", which is not available when you create the workflow using Microsoft Flow.

So the question arises, is this even possible? Yes, it is. This is how you do it - step by step.


  1. Create a Built-in Condition step.
  2. Add your dynamics field (like "Created On"), in the "Choose a Value" box.
  3. Select the option "is equal to" in the next box.
  4. In the last box "Choose a Value", select Expression
  5. Type "null" in the fx (function) box, and select OK.
  6. In the "If no" branch, perform your "contains data" action.
  7. In the "If yes" branch, perform your "does not contain data" action.


Leave your comments down below, if you found this helpful. Share the post within your social family. Appreciate your support.