Category: Microsoft

Improvement/Enhancement needed on Power Apps Portals

Hello Reader,

I am working on Power Apps Portals from past few months during this I personally feel that there is a couple of the area which could be enhanced more to give flexibility to the portal maker in order to achieve user utterance.

I listed few points which should be introduced in future releases of Power Apps Portals.

S.No.Wants More flexibility
1.Business Rule can’t be applied to portal form. If Microsoft brings business rule/something similar to that to entity form to automate the common show/hide, require/none require fields in upcoming releases. It will reduce the repetitive coding work of portal maker.
2.There is 15 minutes of time to happen sync between dynamics 365 CE and portal. It could be less or more sometimes, Perhaps 15 minutes time is documented in Microsoft document. This sync service should be synchronous because sometimes, user input on the portal and it does some calculation in the back end and doesn’t reflect immediately on the portal which kills the user experience.
3.The New File data type is not yet accessible in the portal. The file data type should be available in the portal as well. The reason behind it, Recently I met a requirement where users want to attach multiple files to one note in Dynamics 365 CE and portal both. If I would have file data type in portal then I was pretty close to fulfill user requirements without any code.
4.There is no way to take a backup of the portal yet. It is all waste, If we are unable to take a backup of individual components like a webpage, web template. Microsoft should bring something related to it.
5.After so many MS support tickets Microsoft has given _services/about for quick cache refreshment but still, sometimes changes don’t reflect immediately. This could be more improvised.
6.Odata service is available for retrieve call, It should be for CRUD operation too so that we could have done more in the portal.
7.Missing multi-select option set in the portal. 😦 as we miss in dynamics 365 before it’s arrival.
8.How could we forget about PCF 😦 Badly, want to have the PCF control in the portal too.

I will update the list as and when I find more updates to the Power Apps Portals in the future.

Please leave a comment if you find any missing functionality or any frustrating behaviour with the Power Apps Portals which is not listed above and I will include those in the list.

May the dynamics power be with you.

{Known Issue}Date and Time fields behaves differently in UCI on upgrade

Hello Reader,

I am writing this article to tell you about the known issue of date and time in UCI on upgrade from classic to UCI.

Before this, user had reported that button image and entity icon was shown as jigsaw in UCI for that I had written a blog where I elaborated the root cause and solution of it for reference please click here

Problem Statement: Business reported that written custom logic on date and time field is not working fine(One day less or more than expected) and users from different time zone are experiencing incorrect date value in field.

Root Cause: I tried to dig into it and went to the field properties. As we know that we have Format and Behavior for the field. So, In classic we don’t have control to change the behavior of field. it is Date only by default and this is the catch or in another word I would say this is the only root cause of problem. 🙂

when system upgrade from classic to UCI, the date and time field’s behavior becomes to “User Only” which shows data based on User local time.

Earlier mechanism was working on “Date Only” behavior and that’s why the user faced the data inconsistency.

screen from classic

Solution: Now in UCI, we have the flexibility to change the behavior as listed below:

1.User Only(It shows data based on the user time zone{If in case you have question that what is user time zone then it is nothing but your Laptop/Desktop time setting or your dynamics 365 CE personal setting.})

2.Date Only(It displays data from crm data base where it stores time as 12:00 A.M. always or in other words it shows date in UTC format )

3. Time Zone Independent(it is independent from any conversion and will show you the data exactly what is stored in data base.

Note*: In classic, date and time field’s default behavior is “Date Only”.On upgrade and on creation, date and time field behavior sets to “User Only” by default.

In terms of resolution, I have two option to fix it.

  1. Make the main form to Time-Zone Independent. Nothing to do with date and time field.
  2. Change the behavior of field to Date Only.

And I opted out the 2nd option and change the field behavior as same as in classic which is exactly sorted the problem.

This was challenging for me because I was unaware from the fact which I wrote down in note section.

Bonus Tip : It is advisable that birthday date should have the “Date Only “behavior. If Birthday is being used with time then behavior should be “Time-Zone Independent”

I am hoping that my experience will help you.

May the dynamics power be with you.

{Tip}Switch to Classic even if end users are using UCI [Dynamics 365 CE]

Hello Reader,

Hoping you are safe during this pandemic.

Apparently, users are using UCI(Unified Interface) and they had reported couple or the other defects in UCI. Therefore, I had to investigate and need to tell them whether it is UCI or a classic issue and what is the root cause of it.

In my scenario, entire system is working fine in Classic but couple of the things are not performing well in UCI.

Thus, I had to switch it back to classic for the investigation purpose without loosing any configuration and customization.

Fixed Configuration: My organization system setting is settled up for UCI(i.e.End user only will use UCI)

Question raises that how to switch to classic when you can’t loose any existing data,configuration/customization.

Answer is, Just append force classic to true and it will navigate to old school.

Note*: If you find that this tip is not working somehow. Try it incognito mode. Basically there shouldn’t be any browser history. You should start it fresh.

orgurl/main.aspx?forceclassic=1

Hope it helps.

May the dynamics power be with you.

[Power Apps Portals]Enable Global Search for Custom Entity

Hello Dynamics Enthusiasts,

Hope you are safe while wfh and enjoying your family:)

I am writing this article to explain how to configure custom entity for Global Search in powers apps portal. Microsoft has released this feature in wave 1 2020 portal release. With this feature, user can search across multiple entities and configure what column of entities would be searchable.

Note: This is subjected to change as the limit of the custom entities which can be configurable for global search is 10.

There are a couple of predefined records in “Site Settings” and “Content Snippets” which run the search in the portal and those are listed below:

Site Settings

S.No.Record’s NameDefault Value
1.Search/EnabledTrue
 2.Search/EnableAdditionalEntitiesFalse
 3.Search/FiltersContent:adx_webpage; Events:adx_event,adx_eventschedule; Blogs:adx_blog,adx_blogpost,adx_blogpostcomment;
Forums:adx_communityforum,adx_communityforumthread,
adx_communityforumpost;Ideas:adx_ideaforum,adx_idea,
adx_ideacomment; Issues:adx_issueforum
 4. Search/IndexQueryName Portal Search
 5. Search/Query +(@Query) _title:(@Query) _logicalname:adx_webpage~0.9^0.2 -_logicalname:adx_webfile~0.9 adx_partialurl:(@Query) _logicalname:adx_blogpost~0.9^0.1 -_logicalname:adx_communityforumthread~0.9
 6. Search/Stemmer English
 7. Search/FacetedView True
8.Search/IndexNotesAttachmentsTrue
9.Search/RecordTypeFacetsEntitiesBlogs:adx_blog,adx_blogpost;Forums:adx_communityforum,adx_communityforumthread,adx_communityforumpost;Ideas:adx_ideaforum,adx_idea;Downloads:annotation,adx_webfile
10.KnowledgeManagement/DisplayNotesTrue

Content Snippets

S.No.Record’s NameDefault Value
1.Header/Search/LabelSearch
 2.Header/Search/ToolTipSearch
 3.Search/Default/FilterText All
 4. Search/Facet/All All
 5. Search/Facet/ClearConstraints Clear All
 6. Search/Facet/Downloads Downloads
 7. Search/Facet/Less Show less
8.Search/Facet/ModifiedDateModified date
9.Search/Facet/MoreShow more
10.Search/Facet/ProductProducts
11.Search/Facet/RatingRating
12.Search/Facet/RecordTypeRecord Type
13.Search/Facet/SortOrder/AverageUserRatingAverage User Ratings
14.Search/Facet/SortOrder/Relevance
Relevance
15.Search/Facet/SortOrder/ViewsView Count

Before start to configure the custom entity for search. Please make sure that all the records of “Site Settings” and “Content Snippets” are the same as mentioned above, some of the values(Header/Search/Label, Header/Search/ToolTip) may be different based on your requirement.

Let’s get going and follow the steps as below:

Step 1: Add Search/EnableAdditionalEntities of True value in site setting.

Step 2: create/update the search/filters setting, and add the value Restaurants:new_restaurant.

Step 3: create a “Portal Search” view to the corresponding entity for which you are configuring the global search and all the added column to view will be searchable in the search.

Tip*: “Portal Search” is the default view name in Search/Index/QueryName entry of site setting, If in case you want to change the view name other than Portal Search then please don’t forget to update the new view name in Search/Index/QueryName entry of site setting and you need to maintain the same view name across the entities for which you want to configure search. 🙂

Step 4: Create/Update Entity Permission and associate web role(authenticated user) to it .

a)Entity Permission: Create/Update Entity Permission to the respective entity and you can set any scope as per your need, I have taken Global. Preferably, privileges should be Read only.

b) Go to the Related and assign Web role to it. Web role can be any of your choice if you want to show the result to anonymous user then assign anonymous role. Perhaps, it is not recommended due to data security concerns.

Step:5 Create search result web page to show your detailed information of entity record.

a) By attaching the Entity form. You can create your own web template as well and there don’t forget to pass the record id (I was completely new when I was configuring this and haven’t had idea how to pass the record id so just to make it ease for you :)). Here is the code

{% if page.adx_entityform %}
{% entityform id: page.adx_entityform.id %}
{% endif %}

for the demonstration purpose, I used “Default Studio Template”

Screen from Portal Studio
screen from model driven app

Step 6: Create a Site Maker record where you need to browse the search result page and name it as “entitylogicalname_SearchResultPage”

Now the time has come to “Clear cache” and “Rebuilt search index”

Therefore, I had covered all the steps to configure custom entity for Global search.In case you require any further assistance, can reach out to me on LinkedIn.

Oops,I forgot to show you the result. I typed RES and it showed me three records.

Now, clicked any of them and it will show the Search Result Page.

Hope it helps.

May be the dynamics power with you.

[Power Apps Portals]Change Portal Search Banner

When we start to implement the client requirement in order to match the customer’s branding,the primary requirement is to the change the out-of-the-box search banner.

In this article, I am going to show you how to change the search portal banner in the few steps.

Before we start, you might have look at it –

Let gets started and please follow the steps as below:

Step 1: Navigate to Portal Management

Step 2: Go to the “Web Files” and look for “searchhero.jpg” record.

Step 3: Replace the Notes Attachment with the new search banner image.

Step 4: Clear Cache /_services/about or else Restart the portal and Press the Ctrl+F5 and visualize your change.

for Portal Banner, you can follow the same steps as above and by replacing the image, Notes’s GUID will remain same which will not cause an error during portal deployment.

Hope it helps!

May the dynamics power be with you.

5 Interview Question of Dynamics 365 Customer Engagement {Consultant}

Hello Readers,

Since it is peak time of interview and all the seekers are being passed through with it. I have a few questions which had been asked in my recent interview. I also shared another set of 5 interview questions. You can click here to refer them.

Question 1: What is the Execution Order. Let’s say Execution order set 1 to asynchronous plugin and 2 to sync plugin. What will be the execution order.

Answer: Execution order is the order which run the plugin on the same message(create/update and etc).order will be the same as async plugin will trigger 1st with execution order 1 but it will not wait for its completion and sync will execute in second order.

Question 2: What are the changes which Microsoft has brought from 2011 upto now.

Answer: Since it is simple question with vast complexity and unfulfilled satisfaction of interviewer on it, as there are many more things to tell to your interviewer.Here I am highlighting few of them.

Advanced filtering,This capability brings a lot of Dynamics 365’s Advanced Find from classic web to unified interface. Advanced filtering is embedded on entity sub grid view, user need not to go to advance find every time for creating an expression.

Lookups in the Unified Interface now support the enhanced filtering capabilities which includes for only my records and related records only for web.

Unified Interface UCI gives flexibility to see/handle your CRM on handy mobile.Earlier Entity form was bound to web client now it is platform independent.

Model Driven App is nothing but your Dynamics CRM in app module.

Canvas App,where customization takes place separately.

Question 3: What is the security Model in Dynamics CRM?

Answer: To control data access, you must set up an organizational structure that both protects sensitive data and enables collaboration. You do this by setting up business units, security roles, and field security profiles.

So basically, it is assignment of security role to user based on Teams and BU.

Question 4: Let’s say security role is not assigned to user to see the particular entity, will that entity be visible in Advance Find.

Answer: Yes, Entity will be visible in Advance Find.

Question 5: While upgrading classic view to UCI what are the known issues?

Answer: Custom Ribbon Button showing jigsaw image{Solution: Add Modern image using svc webresource.}

Entity Icon not visible{Solution: Choose 16×16,32×32 images }

Getting form context error on page on load{Solution: Passed execution context by checking the check box.}

Button is not visible on subgrid.{Solution: Add Subgrid view of entity in Model Driven App.}

Hope it will help in your interview preparation.

May be the Dynamics Power with you.

{Tips -Tricks}While working on Client Scripting in Dynamics 365

Hello Reader,

Playing with Java Script is common to all Developers and Dynamics 365 Technical Consultant, Therefore, there are some of the tips and trick which should be followed while working with Java Script.

Some of the tips and tricks are listed below :

Tip 1* Create Namespace of Web-Resource: During working with Web-resource, It is a good practice to use Namespace. Sometimes, It becomes big task to investigate error in large and complex Implementation and that too frustrating if it is causing from the silly mistake and took millions of hours for investigation hahaha

One of the reason is, There are same name function in other Web-resources too. So, during compilation calling function gets confused which function to refer to as it is getting multiple references.

Let’s take an Example.

Scenario 1: If Namespace is not defined.

There are three Web-Resources A and B and C, function xyz is written in Web-Resources A and B, Web-Resource C’s function pqr is calling-function xyz,

During compilation function pqr gets confused as there are two different paths to refer. 

function pqr()
{
xyz();
}

Scenario 2: When Name space is defined

a is the namespace of Web resource A, b is the namespace of Web resource B and c is the namespace of Web resource C and taking the same scenario as above xyz function is being called by pqr with no confusion since Namespace is defined and there is only one way to traverse.😊

function pqr()
{
a.xyz();
}
function pqr()
{
b.xyz();
}

Tip 2* One Onload function: Keep all the function in one function, which is being called on-load event of form. It enhances System Performance and takes less time on load.

Page_OnLoad = function () {
mno();
stu();
xvw();
} 

Tip 3* Don’t register On-change Event handler programmatically: According to developer’s choice, Attribute on-change event should be configured on from. Try to avoid writing formContext.getAttribute(arg).addOnChange(function); in java Script.

To Configure follow the below steps:

>>Go to the Field Properties

>>Click on the Events tab(third from last)

>>Register your function.

Tip 4* Have Common Web-resource commonly used function like WebAPI Call: Should have common Web resource ready where you can have all the commonly used function like Web API Calling function for retrieve Multiple and Single Records or retrieve user access based on Security Role.

if (typeof (MSP) == "undefined")
{ MSP= { __namespace: true }; }
MSP.Common = {
    CommonLibrary: function () {
    },
    RetrieveSingleRecord: function (entityName, entityId, columns) {
        var results = null;
        var entityId = entityId.replace("{", "").replace("}", "");
        var req = new XMLHttpRequest();
        req.open("GET", encodeURI(Xrm.Page.context.getClientUrl() + "/api/data/v8.0/" + entityName + "(" + entityId + ")?$select=" + columns + ""), false);
        req.setRequestHeader("OData-MaxVersion", "4.0");
        req.setRequestHeader("OData-Version", "4.0");
        req.setRequestHeader("Accept", "application/json");
        req.setRequestHeader("Content-Type", "application/json; charset=utf-8");
        req.setRequestHeader("Prefer", "odata.include-annotations=\"OData.Community.Display.V1.FormattedValue\"");
        req.onreadystatechange = function () {
            if (this.readyState === 4) {
                req.onreadystatechange = null;
                if (this.status === 200) {
                    results = JSON.parse(this.responseText);
                }
                else {
                    results = this.statusText;
                }
            }
        };
        req.send();
        return results;
    },

    RetrieveMultipleRecords: function (entityName, Columns, filter) {
        var results = null;
        var req = new XMLHttpRequest();
        req.open("GET", encodeURI(Xrm.Page.context.getClientUrl() + "/api/data/v8.0/" + entityName + "?$select=" + Columns + "&$filter=" + filter + ""), false);
        req.setRequestHeader("OData-MaxVersion", "4.0");
        req.setRequestHeader("OData-Version", "4.0");
        req.setRequestHeader("Accept", "application/json");
        req.setRequestHeader("Content-Type", "application/json; charset=utf-8");
        req.setRequestHeader("Prefer", "odata.include-annotations=\"OData.Community.Display.V1.FormattedValue\"");
        req.onreadystatechange = function () {
            if (this.readyState === 4) {
                req.onreadystatechange = null;
                if (this.status === 200) {
                    results = JSON.parse(this.responseText);
                }
                else {
                    results = this.statusText;
                }
            }
        };
        req.send();
        return results;
    },

    __namespace: true
};

Tip 5* Try avoid to use Global variable: Due to conflict between functions sometimes global variables refers incorrect values which cause error in other function and creates unnecessary pain to developers.

Hope it helps.

May the Dynamics Power be with you!

Azure Logic Apps|synchronizing Teams with Blob storage

Hello Dynamics Enthusiast,

Working on cutting Edge technologies like Azure Logic Apps and contributing to the Dynamics community keeps me energetic. So Here I am, to provide you a step by step guide to sync Teams and Blob storage using Azure Logic Apps.  

Scenario: I came across a requirement where client wants synchronization between Teams and blob storage which should enable end user to attach file to Teams and attached file should be stored into Azure Blob Storage automatically.

Prerequisites: Azure Subscription, Storage Account in Azure Portal.

I am using trigger as SharePoint: When a file is created in folder because Teams Files are stored in SharePoint.It is easy to access the attached SharePoint site for the Teams.

Follow the below steps to achieve the objective.

#1: Logic Apps Blank Template creation

  • Sign in to the Azure portal with your Azure account credentials.
  • Go to the ‘Resource group’.(Either create a new ‘Resource group’ or use an existing one).
  • Create Logic app with blank Template.
  • Search for SharePoint trigger SharePoint: When a file is created in folder.

#2: Enter trigger information

  1. Site Address : Enter your share point site address.
  2. Folder Id : Browse the folder where the teams files are stored in share point.

Refer the below screen.

#3: Search for the blob storage action. I chose Create Blob action.

#4: Enter the action information.

  1. Select the folder path from blob storage (I chose container of blob storage. You can choose container or a folder within a container.)
  2. Select the Blob name.
  3. Select the Blob content.

Below is the summary screen of the Logic Apps to give you a better view.

Executed Logic Apps

Testing: It is important to test whatever you configured. So follow the below steps to validate your configuration.

#1: Before uploading the file, Teams and Blob storage view are as below.

Screen from Teams Before uploading the file.
Screen from Blob storage before the test execution.

#2: Upload a file in Teams.

While uploading the file in Teams
uploaded file

#3: Same file should be replicated in Blob Storage for successful validation of the configuration.

Bingo! Team and Blob synchronized successfully.

Hope it helps to some extent.

May the Dynamics Power be with you!

Azure Logic Apps:When a HTTP request is received|used case[Biz talk Server integration with Dynamics 365]

Hello Microsoft Enthusiast,

Azure is LCNC(low-code/no-code)development platform.There are several triggers available.It is always exciting to work and explore them.So I am demonstrating one of them i.e. When a HTTP request is received.

Scenario: This is the integration between Biz talk Server and Dynamics 365. Azure Logic Apps listens Biz talk Server whenever it receives JSON object and perform the further crud operation. My scenario operation is : If Account exists in Dynamics 365 then update the Account’s address details based on the received ‘Account Number’ from the biz talk server’s request in the Logic Apps.

Let’s start as follows:

#1: Create a logic apps with the template: ‘When a HTTP request is received’. When you click on ‘Save’ button endpoint will be generated automatically and click on ‘Use sample payload to generate schema’.After this a window will popup, paste the JSON(It is prerequisites for you and will differ case to case.) in pop-up window. In this way, ‘Request Body JSON Schema’ will get structured automatically.

Some of the sensitive data has been hidden in some of the screen shot.

#2: Initialize the variable for ‘Account Number’ and ‘Account ID’. Query the ‘List records’ to check whether the Account is present or not in Dynamics 365 based on the received Account Number from Biz talk request.

#3: loop the received input in ‘For each’ loop. Put the condition where Account Number is equal to Biz talk Account Number.

#4: If condition is true then set Account’s Guid in Account ID variable and update the address details in Acoount. Refer the below Screen.

#5: Send the ‘200’ Status Code as Response message to Biz talk Server. So that Biz talk get to know that sent request has been processed successfully. 😊

Test: Once Logic Apps received request from Biz talk, It updates Address details of particular Account.

Screen from Dynamics 365

If you want more clarification/information.Don’t forget to comment.I will be happy to assist you. 🙂

Hope it helps to some extent.

May the DynamicsPower be with you!

Azure Logic Apps|used case[Dynamics 365 Integration with HubSpot]

Azure Logic Apps|used case[Dynamics 365 Integration with HubSpot]

Hello Reader,

In my previous post, I had created custom Connector (If you want to see ‘how’ click here) and now time has come to use it. So, here I am integrating Dynamics to HubSpot using Microsoft Azure Logic Apps.

While working with Azure Logic App,you won’t have to write code in many cases. But if you have to, you will create code snippets with Azure Functions and run that code on-demand from Logic Apps.

Detailed steps are as below:

Step 1: Login to portal.azure.com with your credentials and create ‘Resource group’, if you already have one, kindly use that. I have created crm-int-hubspot Resource group for the demo purpose.

Step 2: Create a Logic App and name it as per your wish. Click on ‘Create’ and wait till it get deployed successfully to Resource group. Start with blank Template.

Step 3: Look for the Trigger. In my scenario, I opted Common Data Service then chose the trigger when contacts get created. After that map the dynamics 365 environment’s information accordingly.

Step 4: Now the question arises for connector. There is no out of box connector available yet, Therefore, I have created custom connector in my previous blog, so continuing with it, I selected Hubspot_CreateContact in Custom tab and below it chose Action Create Contact in HubSpot on creation of contact in Dynamics 365 as shown in below screen.

Step 5: Now add the value of HAPIKey (stands for HubSpot API Key,which interact with information and is unique for each instance) and properties. You can add any property which is defined in hubSpot. For the demo purpose, I am taking firstname, lastname and email 🙂

Step 6: Save Logic Apps and test it. 😊

Testing : Log-in to Dynamics 365 and create contact. The same contact will be created in HubSpot. Bingo!

Creating contact in Dynamics 365.
Same created in HubSpot.

With this, I am done with my HubSpot series. Stay tuned to get more live industry scenario.

Hope it helps to some extent.

May the DynamicsPower be with you ! 🙂