Using Xrm.Utility.getPageContext().input to identity or get parent record details for the Quick Create form – Dataverse / Dynamics 365


Recently we had a requirement to make different sets of fields mandatory and non-mandatory on the Quick Create form for Contact, based on the parent record type it is opened from.

Quick Create Form

As we cannot have multiple Quick Create Form specified for different forms, we had to use JavaScript to identify the parent record type.

We can use the below properties for that.

Xrm.Utility.getPageContext

  • Xrm.Utility.getPageContext().input.data.parentrecordtype
  • Xrm.Utility.getPageContext().input.createFromEntity.entityType

Below we have the contact’s quick create form opened from a custom table – custom_contract’s contact lookup.

A screen shot of a computer

Description automatically generated

On using the above properties in our form load script for the quick create form, we can see different sets of fields set as required and recommended on the Quick Create Contact form based on the parent record it is opened from.

Parent A :

A screenshot of a computer

Description automatically generated

Parent B :

A screenshot of a phone
Description automatically generated

The helpful post – https://butenko.pro/2020/09/15/js-how-to-get-the-originating-record-reference-in-the-form-script-of-the-quick-create-form/

Hope it helps..

Advertisements

Manage solution dependencies easily through the refreshed look – Dataverse


In Dataverse, solution dependencies are a vital aspect of managing and deploying applications. Dependencies ensure that required components are present for a solution to work seamlessly across environments. However, with complex solutions, understanding and managing these dependencies can become overwhelming.

The updated dependencies page is designed to simplify dependency management by offering a more intuitive, action-driven experience.

Select a particular component in the solution, right-click>> Advanced >> Show dependencies.

We can see 3 different tabs.

Delete Blocked By (tab): Displays any dependencies preventing deletion of a component. Below we can see that for the Age column, it shows Contact’s System Form as the dependency.

A screenshot of a computer

Description automatically generated

Clicking on the Open option takes us to the component page, where we can see all the forms for the contact table.

A screenshot of a computer

Description automatically generated

Used By (tab): Lists other components dependent on the selected component.

Uses (tab): Shows dependencies that the selected component relies upon.

A screenshot of a computer

Description automatically generated

On clicking Open, it opens the Columns page for that table.

A screenshot of a computer

Description automatically generated

The different actions that we can take are Open and inspect the object, Delete the object, Remove dependency, and open the relevant documentation.

Below we have selected the option Remove dependency. As we saw the dependency here refers to the Contact System form in which we have the age field used.

A screenshot of a computer

Description automatically generated
A screenshot of a computer

Description automatically generated

Select Remove.

A screenshot of a computer

Description automatically generated

We get the success message after the successful removal of the dependency.

i.e. we can see the field removed from the blocking Contact’s System form.

Now if we want we can easily delete that particular field with no object blocking the delete.

Lastly, the Delete option for the solution allows the delete (uninstall) the solution that has dependencies on the solution component.

Get all the details here.

Hope it helps..

Advertisements

Using Copilot to Create and Explain Formulas – Power Apps


Using the new features – Create a formula (preview) and Explain this formula we can now easily write, edit, and understand formulas in Power Apps.

To enable it, navigate to switch on – Settings >> Updates >> Preview >> Copilot for formulas

Here in the sample app below, we are trying to set the Items property of the Gallery using Create a formula. Here our gallery control is bound to Cases as the data source.

A screenshot of a computer

Description automatically generated

We can describe what formula we need in plain language.

A screenshot of a computer

Description automatically generated

We can see it generating the formula for us. We have the option to Apply, Discard, and Copy it.

A computer screen with a blue background

Description automatically generated

Here we have applied the generated formula.

A screenshot of a computer

Description automatically generated

Another example is where we are setting the Text property.

Here instead of the customer name it considered the Customer Contacted field. So basically we need to review the formula generated.

A screenshot of a computer

Description automatically generated

We can also generate formula from code comments as show below. Simply type the comment and wait for formula to be generated or otherwise press Enter.

The result

Next using Explain this formula we can use the copilot’s ability to explain the formula in plain language.

The result

A screenshot of a computer

Description automatically generated

We can also select specific parts of the formula for explanation.

Below we have selected the Filter keyword and Explain this selection option.

A computer screen with text and arrows pointing to the right

Description automatically generated

The result

A screenshot of a computer

Description automatically generated

Similarly, on selecting SortOrder

A computer screen shot of a computer screen

Description automatically generated

The result

A close-up of a text

Description automatically generated

Get all the details here

Hope it helps..

Advertisements

Field suggestions by Copilot –Power Apps (Dataverse)


Field Suggestions by Copilot for Canvas Apps apply to Gallery, Form Table controls both classic and modern for Dataverse, SharePoint, or SQL Server data source. It analyzes the schema of the table selected and recommends up to 10 fields that also include a maximum of 10 required fields of that table.

Let us see it in action.

Below we have the following fields defined as required fields in the lead table.

A screenshot of a computer

Description automatically generated

Now inside CanvasApp when we insert and bind the Modern Form / Table or the classic Edit Form / Display Form, Data Table to the lead table it automatically suggests the fields for binding.

Here we have selected Lead as the Data Source for the Edit form or Form (modern) control.

Here we can see it suggesting all the required fields of the lead along with other key fields of lead like City, Country, Email, First Name, etc.

In the case of Table, we can see it suggesting the following 10 fields.

A screenshot of a computer

Description automatically generated

In the case of a custom table with very few fields in it, it suggested the below fields for Form and Table control.

A screenshot of a computer

Description automatically generated

Get all the details here.

Hope it helps..

Advertisements

Using the Smart Paste (Preview) feature to fill the form fast in Dataverse / Dynamics 365


To enable this feature navigate to Power Platform Admin Center > Environment > Features > Enable smart paste (preview)

With the smart paste feature, we can copy the text to the clipboard that has the details we want to fill in for our form and click the smart paste button or use our normal CTRL + V. Copilot will analyze the pasted text and will provide suggestions for the different fields on the form.

Suppose we have copied the below text from an email received–

Below we have selected the Smart paste button.

We can see the notification that the Smart Paste is analyzing the clipboard data.

A screenshot of a computer

Description automatically generated

And can see it populating the suggestions for most of the fields from the text we had copied.

We can click on Accept all suggestions or select it for the individual fields.

A screenshot of a computer

Description automatically generated

On Accept all suggestions we can see the values auto-filled from the copied text in clipboard –

Get more details

Hope it helps..

Advertisements

Maximise Storage usage using Allocate Capacity (preview) in Dataverse / Dynamics 365


The new Allocate Capacity feature allows administrators to manage and optimize storage allocation across different environments. It allows administrators to strategically distribute available storage among the Dataverse environments based on each environment’s unique needs ensuring each has the right amount of storage to maintain performance and avoid service interruptions.

Navigate to Resources >> Capacity >> Dataverse inside the Power Platform Admin Center and select an environment to make the Allocate capacity option visible.

A close up of a pen

Description automatically generated

It shows the available storage, and current usage of the environment selected.

A screenshot of a computer

Description automatically generated

We can allocate Database, Log, and File-specific storage and also configure alerts.

A screenshot of a computer

Description automatically generated

If an environment exceeds, it shows up as “Overage” as shown below

A screenshot of a computer

Description automatically generated

Using this new feature, admins can Allocate Capacity effectively by monitoring the storage usage across environments, setting alerts when the environment nears its capacity limit, and allocating the capacity strategically e.g. production environment will get higher allocation compared to the development environment. Admins can also purchase additional storage and allocate it as required to ensure each environment runs smoothly.

Get more details

Hope it helps..

Advertisements

Nishant Rana's Weblog

Everything related to Microsoft .NET Technology

Skip to content ↓