Nested Editable Grids in D365 CE v9 UCI

Nested Grids – as the name suggests is a grid-within-a-grid (or rather, Grid-ception!). Nested Grids will let you expand a sub-grid entry to look at another grid of the expanded record. This depends on how you configure it.

Be aware, Nested Grids work with Editable Grids and only for Tablet, Phones and Unified Interface. This is not available for the classic Web UI.

Configuring Nested Editable Grid

Here’s my entity structure – I have Account, having multiple Contacts and each Contact, having Opportunities under them. Like in the below diagram –

relationships

Now, I have a Contact grid on my Account form (just like we usually do).

  1. I now will have to choose the grid to be a Editable Grid Control as follows. Also, click on the Nested grid view control as pointed
    editableGridControl
  2. On clicking the Nested grid view pencil, the next dialog box will let you select what entity you want the Nested Grid to be for. Note that this is with respect to the Contact entity and not the Account entity. For this example, I chose Opportunities.
    selectEntity.png
  3. On selecting the entity, I have to make sure my View is also correctly set to show the records
    selectView.png
  4. Now, my dataset will populate from the selected Entity and View. next we will need to select what should be bound as a key. Going back to the Nested grid parent ID pencil this time
    selectNestedGridView
  5. Select what should be the field to bind the data. In this case, I want to show the one that is related to the Contact expanded.
    parentControlIdSelection
  6. Now, click OK for everything and your configuration should look like below.
    Finally save and Publish all customization.
    finalConfig.png

Using Nested Editable Grid

Now, if you look at the Contact grid on the Account form. You’ll see an arrow on each record which indicates that it can be expanded.
collapsed.png
And when you click on it, you’ll see the Nested Grid for Opportunities we configured in the section above
expanded
And yes, Opportunity too is editable in-line!

Hope this helps!!

Advertisements

Enable Flow button on D365 Ribbon

This is a pretty simple tweak to either show or hide the Flow button on the entity Forms’ Ribbon.

flowButtonVisible

Flow Button Not Visible

nowFlow

System Settings

Navigate to Settings > Administration. Go to System Settings
systemSettings

In System Settings, under Customization tab, look for Enable Microsoft Flow option.
customizationTab

You’ll be asked for permission
permission.png

Now, this is turned on
turnedOn.png

Flow Button Visible

Now, once you have enabled this setting, you’ll be able to see the Flow button on the View and Form ribbons across Dynamics 365 CE
flowButtonVisible

That was quick!!

Solving ‘The record could not be deleted because of an association’ error in D365 CE

Restricting Delete for child records is something customizers should start paying special attention towards defining 1:N relationships for entity records.

System Customizers often design this on purpose so that you are aware that the record you are deleting has child records associated with it and cannot be deleted.

Let’s consider this scenario  – Account is a parent of Subscription (which is a custom entity)

relationship

 

Error

Assume, Subscription 1 record has Account lookup to record A. Datum Corporation. When you attempt to Delete the Account, you get this error message.

actualError

And when you download the Log File from the button on the error message, you can see at the very bottom on the Log that Cascade Delete failed due to the restriction.

It also mentions what child entity is causing it
highlightError

Reason

The reason being 1:N relationship on the Account entity to Subscription entity.

deleteRestrictionInRelationship

Workaround

Now, since this is a Restriction on Delete, you can either change it if you are allowed to modify the behavior and it should be fine
changeableBehavior
However, some system relationships can’t be changed. Example – Opportunity to Quote relationships
systemRestricted.png

To overcome this, you can remove the Opportunity Lookup value on the Quote entity and save the record.

Then, the parent Opportunity can be deleted.

Hope this helps!

PSA v3 View Custom Controls used on Project form

Here’s a summary of what all Custom Controls are used in the out-of-the-box PSA v3 Project form. I strongly recommend not changing the existing controls/views.

However, if you accidentally delete any Tab/View, this post will help you get it back! 🙂

Project Task View

Project Task uses AdditionalColumns as the Default View from entity Project Tasks (Project)
projectTaskView

and the Control used is CC_ProjectTaskControl and note that the CC_TrackingView is CC_ProjectTaskControl_NotTracking, you’ll see a different CC_TrackingView used later below.
projectTaskControl

 

Resource Assignments View

Resource Assignment uses Active Estimates as the Default View from entity Project Tasks (Project)

resourceAssignmentView.png

And uses CC_ViewType as CC_EstimatesGridControl_AssignmentView
resourceAssignmentControl

Resource Reconciliation View

Resource Reconciliation View also uses the same Active Estimates View as in Resource Assignments
estimatesView

but uses CC_ReconciliationControl for the control
reconciliationControl

Estimates View

Again, Estimates View uses the same Estimates view as mentioned in the Reconciliation View and Resource Assignments View above.
estimatesView

Also, it uses the same CC_EstimatedGridControl but the CC_ViewType is CC_EstimatesGridControl_FinancialView
estimatesFinancialView

Tracking View

Tracking View uses the All Project Tasks as the Default View
trackingView

It uses the same CC_ProjectTaskControl as used in the Project Task view but CC_TrackingView here is CC_ProjectTaskControl_Tracking
TrackingControl

Expense Estimates View

Again, Expense Estimates View uses the same Estimates view as mentioned in the Reconciliation View, Resource Assignments View & Estimates view above.
estimatesView

But the CC_ViewType used is CC_EstimatesGridControl_ExpenseView
expenseViewControl.png

 

Hope this summarizes and helps you build your custom form quicker.

Using Templates from D365 CE in D365 App For Outlook

Using D365 App For Outlook’s Template feature, you can simply pull a template from Dynamics 365 CE and use it to send emails from Outlook itself. Here’s a typical example in this post below –

In case you are also looking to get started with D365 App For Outlook, you can refer the post here – Summarizing D365 App For Outlook Setup in 3 steps with Exchange Online mailbox

or

Check how you can add your entities to D365 For Outlook here – Enable entities for Dynamics 365 App For Outlook

Email Template in D365

Let’s say I’ve this template prepared for myself in D365 which I want to use in order to quickly reply to my queries asked.

To keep things simple for example, I’m only using the attribute First Name of the Contact in my sample template.

templateIn365

Add a Template in Outlook

Now, let’s say I got this email from Priyesh asking for a quick discussion.
incomingEmail

Now, instead of thinking and replying, let me just use one of my standard templates to respond. Here’s how I do it –

 

  1. In this case, I’ve opened a new Email to respond (selected Reply/Reply All) and opened D365 App For Outlook besides.
    dropDownMenu
  2. Then, select Add Template option
    addTemplate
  3. Remember, you’ll need to have the record tracked before you could select a Template
    trackMissing
    (In this case, I tracked the record against the Contact record itself)
  4. And then try selecting Add Template again. Next, you’ll be asked to select the Template Entity based on the fields in the Email. In this case, it identified that Priyesh Wagh was a Contact from D365
    selectEntity.png
  5. Based on #4 above, it identified that Contact entity is in context and accordingly, it’ll show me Templates for Contact entity.
    quickReponseTemplateInOutlook
  6. Once I select this, I will be asked for confirmation to insert into Email.
    confirmSelection
  7. And there we go! Email is ready to be sent in the next moment. Note that Priyesh in the Email body got populated from the Template’s First Name attribute.
    emailInserted

 

Hope this helps!!

Date and Time field’s Time-Zone behavior in D365

In most cases, customizers/administrators leave the Date & Time field as Local without paying much attention to detail.

types

With involvement of time, there are 2 behaviors while creating the field (or changing them, but there’s a catch)

You can change from Local to Time-Zone Independent any time, but can’t change from Time-Zone Independent to User Local once saved this way.
cantChangeBehavior

User Local

The Date & Time displayed in this field will be converted to the time-zone you are situated in.

localTime

Let’s say, the Date & Time is stored in UTC behind the scenes was 25th June 2019 6.30 PM, so whatever was stored, it will be converted to your System User’s local time according to the Settings. See below –

myTimeZone.png

Time-Zone Independent

This type of Date & Time of field, the time is stored in UTC, regardless of where you are located in the world.

timeZoneInd

If it is 6.30 PM on 25th June in UTC, it will be 12 AM in India on 26th June

 

It’s pretty basic, but needs to be done carefully!

Hope this helps.

Execute an Action from a Business Process Flow

One of the easiest and useful feature of a Business Process Flow is being able to Implement and Action right from a Business Process Flow just with a click of a button.

Here’s how you do it.

Let’s say you have an Action that you want to trigger that the Account was Approved for some sort and you want to alert the Stakeholders. You can have this functionality in your Action and call the Action from the BPF itself.

Action

  1. Let’s say your Action has some logic as below which you want to execute when you trigger Action on BPF
    actionLogic
  2. Make sure your Action is marked as below for it to be enabled for adding in a BPF
    enableForBPF

Once this is set, let’s move to the BPF part.

Business Process Flow

  1. In a BPF, since you have enabled your Action to be added to BPF, you’ll be able to add it as below.
    addActionStep
  2. In the Properties, look for your Action Process and select it and click Apply.
    actionFound
  3. Make sure you’ve clicked on Apply.
    apply

Now, you’re all set. Let’s see how it works.

Execution

Now, this is how you’ll see your Action on the BPF on the record,

executeButton

When you click on Execute, it will mention (if you don’t have any Input parameters) that there are not parameters and ask for Confirmation
noInputParameters

Once you confirm, this is how it will show while executing –
executing

 

If there’s any failure, it will show as below
executionFailure

 

And success like this
success

Simply click and the Action will execute!

Hope this helps!!