Improved search experience now adds Quick Actions – 2021 Release Wave 1 – Dynamics 365


Improved search experience added features like easy access of search from within the header

https://nishantrana.me/2021/01/12/improved-search-experience-in-dynamics-365-powerapps/

More details and filters option

Incremental search or real time suggestions while performing the search

Now the 2021 Release Wave 1 adds Quick actions to the search results as shown below.

The quick actions available for accounts, contacts, etc. are

  • Assign
  • Share
  • Email

For the Phone call or activity entity, the options available are

  • Mark Complete
  • Cancel
  • Set Regarding
  • Assign
  • Email a Link.

The quick action are also available within the search results

Search

Read more about 2021 Release Wave 1

https://docs.microsoft.com/en-gb/power-platform-release-plan/2021wave1/

For Posts on

  • 2020 Release Wave 2

https://nishantrana.me/2020/08/14/posts-on-2020-release-wave-2-dynamics-365/

  • 2020 Release Wave 1

https://nishantrana.me/2020-release-wave-1/

Blog posts on 2021 Release Wave 1 – Dynamics 365

Hope it helps

Advertisements

Duration to Copy an environment – Dynamics 365


Recently as a part of our deployment activity – we had to copy one of our sandbox environment to another.

https://docs.microsoft.com/en-us/power-platform/admin/copy-environment

And we opted for Customizations and schemas only option

We had performed the activity a few days back and that time we opted for Everything (the environment size was around 3-4 GB) , it took around 40 minutes. So we were expecting the customization and schemas only option would be much faster.

Surprisingly it was more than 4 hours since we initiated the copy and it was still in progress, so we raised the Microsoft Support Ticket with severity A.

https://azure.microsoft.com/en-us/support/plans/response/

However, no sooner we raised the support request, in parallel the copy operation got completed.

Total it took around 4 .5 hours.

The reason as per the support team was that the server could be down for windows maintenance activity being it a weekend – Saturday.

Later at night also, we performed the same copy operation that time it took around 2.5 hours.

And recently 2-3 days after that day, we again performed the copy operation and it took the same 30-40 minutes – this being weekday.

So in case if it is taking more time than usual, you could raise a support ticket or could wait (if that is an option).

Hope it helps..

Advertisements

How to – Use Form Component Control in Dynamics 365 / Power Apps


Form Component Control can be used to update the parent record -through Debajit’s blog post, we came to know about it-  https://debajmecrm.com/how-to-edit-a-parent-record-from-child-record-form-in-dynamics-365-dataverse/

Below is our custom entity/table named Sample Entity having contact’s lookup.

Let us add one more contact field, specify the Form Component control for it

We need to specify the main form to be used as a static value within the QuckForms tag.

entityname will be the schema name of the entity and the id of the main form.

Get the form id in the classic form editor –

And in the new form designer –

Save and publish the change.

We can see the main form of the contact being rendered within the custom entity’s form on the selection of Contact lookup value.

Now let us look at the some of the key points –

  • Only the Main form can be considered while using form component control i.e. only the main form can have the form component control which must be the main form itself. Quick View, Quick Create, and card cannot be used.
  • The form component will only show the first tab of the form. Below is the form we have configured, but it shows only the summary tab.

  • The validation of the embedded parent form still applies as shown below.

  • Data is sent for save independently for each record, which has no defined order.
  • It is not recommended to use the form with Business Process Flow as a form component.
  • Form components cannot have another main form with form components embedded in them. Although we do not get any error, it might be unsupported.

  • The same form can be used across different form components but is not supported as per Microsoft Docs. Here we have embedded the same form inside Account’s form.

Get all the details here

https://docs.microsoft.com/en-us/powerapps/maker/model-driven-apps/form-component-control

Hope it helps..

Advertisements

How to – Send an email using AddressUsed attribute of ActivityParty entity in Dynamics 365


When it comes to sending an email in Dynamics 365 / CE / CRM, we specify the entity’s record (with email enabled) in to, cc and bcc field of the email activity entity, and then the email address attribute of that particular record is used.

We can enable email for a custom entity also.

What if we have multiple email address fields specified for a custom entity?

The field which was created first will be used.

Check the below blog post –

https://debajmecrm.com/making-an-entity-enabled-to-send-emails-in-dynamics-365-and-its-existing-email-fields-gotchas/

What about entity like contact and account which have email, email address 2 and email address 3 fields?

If we trying sending an email to the above contact record, which has email address fields as blank programmatically we will get the below error

“Could not find the email address for the recipient of type ‘Contact’ with ID…”

What if we only have the email address 3 field having email id specified and the other 2 email field are blank?

This time our code will run without error, and CRM will pick up the email id specified in the email address 3 field. It will first check for email, then email address 2, and then finally email address 3 field. This happens only in the case of out of the box entity like contact and account.

What if we want to send an email to an email id not specified in the record?

Well in that case AddressUsed attribute of Activity Party can be used as shown below –

On running the above code, we can see the email specified in the addressused field being used

Understand more about activity party entity

https://docs.microsoft.com/en-us/previous-versions/dynamicscrm-2016/developers-guide/gg309626(v=crm.8)?redirectedfrom=MSDN

The helpful post

http://mostlymscrm.blogspot.com/2012/11/sending-emails-to-specific-address.html

Hope it helps..

string ConnectionString = "AuthType = OAuth; " +
"Username = userid;" +
"Password = pwd; " +
"Url = https://mydev.crm.dynamics.com/;" +
"AppId=51f81489-12ee-4a9e-aaae-a2591f45987d;" +
"RedirectUri=app://58145B91-0C36-4500-8554-080854F2AC97;" +
"LoginPrompt=Auto";

            CrmServiceClient svc = new CrmServiceClient(ConnectionString);

            if (svc.IsReady)
            {
                
                // guid of the contact record 
                Guid contactID = new Guid("0bd90832-bb52-eb11-bb23-000d3a5696d2");

                // initializing activity party entity
                Entity fromAP = new Entity("activityparty");
                Entity toAP = new Entity("activityparty");
                fromAP["partyid"] = new EntityReference("systemuser", new Guid("7de293e1-8352-eb11-bb23-000d3a569919"));
                toAP["partyid"] = new EntityReference("contact", contactID);

                // using the addressused attribute
                toAP["addressused"] = "nishant.rana.bliss@gmail.com";

                // create email record
                Entity email = new Entity("email");
                email["from"] = new Entity[] { fromAP };
                email["to"] = new Entity[] { toAP };
                email["regardingobjectid"] = new EntityReference("contact", contactID);
                email["subject"] = "Sample Subject";
                email["description"] = "This is sample description.";             
                Guid emailId = svc.Create(email);

                // Send email
                SendEmailRequest sendEmailRequest = new SendEmailRequest
                {
                    EmailId = emailId,                   
                    IssueSend = true
                };

                SendEmailResponse sendEmailResponse = (SendEmailResponse)svc.Execute(sendEmailRequest);

            }
Advertisements

How to – Create a custom API of type function in Dynamics 365 / Microsoft Dataverse


Continuing our previous posts,

Create Custom API Message
https://nishantrana.me/2021/01/13/use-custom-api-to-create-custom-messages-in-dynamics-365/

Allowed Custom Processing Step Type Property –

https://nishantrana.me/2021/01/20/allowed-custom-processing-step-type-allowedcustomprocessingsteptype-property-of-custom-api-in-dynamics-365-microsoft-dataverse/

Here we will create a custom API of type function by setting Is Function property as true.

  • The function requires HTTP GET method.
  • The function must include at least one Custom API Response Property defined.
  • The function cannot use Entity or Entity Collection Request Parameter, i.e. Binding Type can only be Global in case of Function.

Let us define a Custom API Response Property and associate it with the custom function defined.

Here we have defined a custom API response property of type Boolean.

The other data type supported are

Below is the plug-in that we will associate with the Custom API message, here we are setting the value of the response parameter.

Associated the plugin to the custom API message

Let us trigger our function using the Postman.

Invoking Custom APIs

https://docs.microsoft.com/en-us/powerapps/developer/data-platform/custom-api#invoking-custom-apis

Plugin trace log –

More information on Custom API

Hope it helps..

Advertisements

Custom API Request Parameter entity in Dynamics 365 / Microsoft Dataverse


Continuing our previous posts on Custom API

Here we will look at the CustomAPIRequestParameter entity.

  • This entity can be used to define input parameters to the Custom API.
  • It is not a mandatory entity for Custom API i.e. we can define a custom API without any input/request or output/response parameter.
  • In the case of multiple parameters, ordering is not important as they are identified using the name.
  • One parameter can be associated with only one Custom API.
  • We can have multiple parameters with the same Unique Name as long as they are associated with different Custom API.

Say e.g. below is our Custom API

And this is our Custom API Request Parameter associated with the above API of type String

The different data type for the request parameter

Below is our plugin registered for the custom message.

We are checking for the input parameter and writing it in the trace log.

Let us call our custom API

And let us check the plugin trace logs.

We can see the message being called successfully.

Get more details –

Create and use Custom APIs

Hope it helps..