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!

Advertisements

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.

Change the Unified Interface App Icons

Default App Icons for typical D365 environment look like these.

defaultAppIcons

But here’s what you can do to change these to put custom SVG icons.

SVG Icons

Regardless of dimensions, SVG icons work everywhere. So why keep them to just Ribbons, you can even change your App Icons to SVG Icons in your Dynamics 365 implementation.

  1. Make Web Resource for your SVG Icon.
    svgWebResource
  2. Open your Model Driven App in Dynamics 365 Solution. In the App Designer, go to Properties of the App itself and look for the drop-down above App Tile.
    defaultSalesIcon
  3. Select your SVG Icon and Publish the same
    newIcon.png
  4. And you’re set!
    updatedIconTile
    updatedIconSidebar

Hope this helps!

 

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!!

Select which Appointments should be synced to Outlook from D365 CE

Perhaps you want to select what all Appointments should be synced to Outlook and not all from Dynamics 365. You can simply have a custom filter control this behavior for yourself and choose which all Appointments should go over.

Customization

Add a new Two Option field in your Dynamics 365 Appointment entity which will specify if the Appointment should be sent to Outlook or not.
isSyncedField

 

Personal Settings

Now, you’ll need to add this field to the My Appointments view for yourself. You can do so by going into your Personal Settings from the Gear Icon on top-right corner
Options

Then, go to Synchronization and select filters as shown below
selectFilters

viewSelector

You can modify the My Appointment view in your custom filters as follows

modifiedFilter.png
Choosing which Appointments to Sync

Now Appointment 1 and Appointment 3 are marked as Is Syned? == Yes. So only those will appear in the Outlook and the rest will stay in D365 itself.

Scenario

In my Dynamics, I created 3 Appointments – Appointment 1, Appointment 2 & Appointment 3.

Of which, Appointment 1 and Appointment 3 are marked to be synced and Appointment 2 is marked to not Sync. See below –

table

So, only Appointment 1 and Appointment 3 will be synced and not Appointment 2

synedOnlySelected

Hope this helps!

New ‘Capacity’ analytics on PowerPlatform Admin Center

We are quickly transitioning over from Organization Insights which came as a managed solution inside D365 to CDS For Apps Analytics on the PowerPlatform Admin Center. My past blog on the same (CDS For Apps Analytics instead of Organization Insights. Power Platform Admin Center).

And now, the same is revamped as Capacity in PowerPlatform Admin Center.

So, if you go to Storage in CDS For Apps analytics, you’ll see this –
movedOver

Capacity

You can access Capacity section directory from this URL – https://admin.powerplatform.microsoft.com/analytics/capacity

Or from the left hand menu as below –

menuItem

Now, as opposed to previously summarized % of the total capacity available, Microsoft is providing new entitlements for different types of storage consumption –

capacityView
Zoomed below

zoomedCapacity

As mentioned above, the bifurcation is as follows –

DATABASE: All other entities apart from the ones mentioned below.

FILE: Attachment, AnnotationBase tables

LOG: AuditBase, PluginTraceLogBase tables

 

Per Environment View

A Per Environment View looks like below and you can click on the Graph icon to go into the details
perEnvironmentView
At this point, information for the Graphical details are yet to be available. I’ll update post this is available for me too.

Availability

New Capacity model differs and will be available once the current term ends. More information from the links in the More Information section below
waitingForRenewal.png

More Information

You can refer more on Capacity here – https://docs.microsoft.com/en-us/power-platform/admin/capacity-storage

Microsoft’s FAQs – https://docs.microsoft.com/en-us/power-platform/admin/capacity-storage#faq

Hope this quick summary helps!

Create new CDS Environment and Database quickly from PowerApps Admin Center

With the April 2019 Updates, you can straight way create new D365 instances right from the PowerPlatform Admin Center.

Create New Environment

Follow these steps to create your environment from PowerPlatform Admin Center

  1. Go to https://admin.powerapps.com/environments and you’ll see an option to create New Environment.
    createNew
  2. Fill suitable details and proceed. Also, check the last section in this blog to see the difference since I chose another region than my source/original tenant when I created the D365 Trial instance (It was North America).
    specs.png
  3. You’ll see the message once this is being created.
    creating
  4. Finally, once completed, you’ll see this message where you’ll be asked if you want to proceed to creating the database as well. I recommend to create the Database as well, this will save time.
    asksToCreateDatabase

Creating Database

Considering you came here from creating the environment itself rather than choosing to create a Database to an existing environment, we’ll see how we proceed from the last Create database section.

Once you select the Create database from point #4 in the above section, you’ll see be asked to select the preferences of the database.
selectCurrency

Once you select the Currency and Language, the creation of the database will take place
creatingCDSDatabase

Once done, you’ll see that the environment and database will appear in your list.
createdENV

When you open the environment, you’ll see that for a few moments, this is being provisioned.
provisioning
Once the message goes away, you’re all set!

Instance Region

Now, note that my CDS Environment is created in the Asia Pacific (APAC) Region.
asiaRegion
And I don’t see my other regions here because the URL I’m on is port.crm5.dynamics.com

crm5URL

Whereas my original D365 Instance that got created with this trial exists on the port.crm.dynamics.com Admin Center
crmURL

 

Hope this quick post helps! 🙂