Create & Send PDFs from Word Templates for Quotes in D365 CE Wave 2 Updates

And as we continue to ride on the Wave 2 October release features of the D365 for Sales, here’s a much anticipated feature Salespeople have been asking for. The ability to send Quotes as PDF (derived from Word Templates) right from the Quote itself.

At the time of this blog, I had enabled the Wave 2 Updates on the trial instance. Kindly try the same in your Sandbox instance first.

If you’re looking to enable Wave 2 Features for your organization, check this post –  Early Opt-in for October 2019 Wave 2 Updates.It is recommended you try these features on the Sandbox first.

Enable PDF Generation

As a part of the Wave 2 feature, you’ll need to enable this in the App Settings in the Sales Hub (typically).

  1. Navigate to App Settings
    appSettings
  2. In App Settings, look for PDF Generation area as shown below, You’ll notice that the feature might be turned off.
    settingOff.png
  3. You’ll simply need to turn it on and then Apply the changes.
    settingOn
  4. That’s it. You’re all set to use it. You’ll now see the 2 new buttons to Create PDF or Email as PDF.
    newButtons

    When this feature isn’t enabled, you won’t see the buttons –
    noButtons

Generate PDFs only

  1. Now, as the name suggests, if you chose to only Create a PDF out of the Word Templates you already have in place, simply drop down the menu and select the template you wish to get the PDF of.
    createPDF
  2. And the browser will throw a file in your system like any other download.
    downloadedPDF.png

Send Directly in Emails from Quote entity

  1. Typically, once things look good, you want to just send out the PDF as an attachment in an email from Dynamics. This button will let you do just that –
    emailAsPDF
    As you observe, this also works with your personal Word Templates too.
  2. Once you click on the Template, an email is ready for you to start writing and send when ready with the template attached as PDF already.
    draftedEmail

There are also some smart emailing capabilities that let’s you send email right from the context of the record. Check this post of mine for the same: Contextual Email communication in D365 CE Wave 2

Hope this helps!

Advertisements

Modified By (Delegate) & Created By (Delegate) in D365

These fields which are everywhere but you don’t really pay attention to really mean something worth.

So if you feel you want to get hold of someone for modifying a record. Maybe also take a look at Modified By (Delegate) just in case so that the actual user might be someone else who wanted to do another thing on that record. 🙂

Impersonation is one of the basic aspects of a plugin step that you need to carefully design to let another user (usually Admins for most implementations) make the plugin run under their context instead of giving more security roles/privileges to every other new user.

Well, same goes for Created By & Created By (Delegate) also!

Modified By

Usually, when you update something on a record, the Modified By is updated as expected. But notice that Modified By (Delegate) is not updated.
noDelegate.png

That’s because you are the rightful owner of the record and there’s no other person involved.

But what is someone else is modifying the record (who don’t have access to that record)?

In that case, Modified On (Delegate) field is populated with the name of that user. In such scenarios, Modified By (Delegate) user is the one who caused changes to the record.

delegatedUser

Why Modified By (Delegate) was populated

The reason this was populated was because the record was updated through a plugin by a user who doesn’t have Write access to the record.

But because the user invoked a plugin which was Impersonating as a User who has rights to the records, the record was successfully updated. And this, the actual user who called the plugin is the one who will be populated in the Modified By (Delegate) field.

impersonatingOtherUser

Hope this quick tip helps!

Customize Opportunity Close dialog box in D365 CE v9 Unified Interface – Wave 2 update

Oct 2019 Wave 2 update got one of the most asked feature. Being able to customize the Opportunity Close Dialog box.

Assuming, you have enabled 2019 October Wave 2 update enabled for your Organization or you’re reading this post Oct 2019 with Wave 2 Updates already applied to your organization.

For Early Access of Oct 2019 Wave 2 Updates, follow my post here – Early Opt-in for October 2019 Wave 2 Updates

Please note that this feature is still not generally available and is not recommended for Production use yet.

Non-Customizable Opportunity Close Dialog

Up until now, you had this familiar Opportunity Close dialog where all you could do is just fill in the details and Close the Opportunity.

nonCustomizableCloseOpp

And you couldn’t add your own fields or modify it in anyway.

Please note that this feature is only available for the Unified Interface on Orgs enabled for 2019 Wave 2 Updates (Early opt-in or General availability)

Enable Customizable Opportunity Close Form

System Settings

Please note that this is a feature Admins will need to activate for the Organization and won’t be automatically updated once the Wave 2 updates are applied.

Under Sales tab in System Settings, enable Customize close opportunity form
turnOnSettings

Custom Fields

Example: Let’s say I have this field called as Internal Reason, I’ll add it on the Opportunity close entity (which users will use this on the Opportunity Close form when closing an Opportunity)
internalReasonField

And I’ll simply add it to the Opportunity Close Quick Create form
addToForm.png

Opportunity Close Quick Create Form

Once you do this, a Quick Create form you defined will open up instead of the traditional dialog box and you can include your custom fields on the same as well
customizableOppClose

Happy 365ing always! Hope this helps.

Early Opt-in for October 2019 Wave 2 Updates

August 2, 2019 was when the Wave 2 Updates were to be out. And here we are! By now, you should have gotten the option to update the wave 2 updates on your environment(s).

Let take a quick look at how you can enable this for your environment.

Here are the details Microsoft notes on the Early opt in to 2019 release wave 2

Enabling Wave 2 2019 Updates

Visit https://admin.powerplatform.microsoft.com/ (PowerPlatform Admin Center) and go to Environments.

Select the environment
selectEnv.png

Check that the updates are available for Activating. Initially the 2019 release wave 2 updates will appear Off. Click Manage.
Please note that you should try this on the Sandbox first before opting to apply on Production directly.
manageButton

Click on Update now

updateNow

Click Confirm.
confirm

And the Updating will start in a few moments.

Progress

You’ll see that the Apps are being updated as shown below for a few hours
updating

As and when each of the apps complete, it’ll show progress as below
partialComplete.png

Once complete, this will be the status
completeSetup.png

2019 Wave 2 Updates Applied

Once completed, you can log into Dynamics and check the About section to find out that the updates have been applied
completed

Here’s what everything’s included in the 2019 wave 2 updates: 2019 release wave 2 features available for early access

Happy 365ing! Hope this helps.

Workaround to get Plugin Profiler from the Unified Interface in D365 CE

Developers like me, often need to Profile the Plugin so see what logic you are implementing and this is pretty common in the development lifecycle. But, Let’s say you don’t have the classic UI at your disposal and need to download the Profiler from the Unified Interface itself – Here’s a little detour you’ll need to take to get it right.

Alternatively, using Persist To Entity is also preferred. But example – if you have a plugin on Create and on PreOperation, you won’t want to record to be created, you can go with the below –

Ease of the Classic UI

On the classic UI, you would get the Profiled file correctly just by Download Log File button on the interface itself.

classicProfiler

And the file has correct data starting with –
startingWIth

And ending with
endingWith.png

Profiler Message on the Unified Interface

As of now, the message pop-up for the profiled plugin will give you this –
currentUCIMessage.png

And the file has this –

currentUCIFile

And the Plugin Registration Tool doesn’t understand this! You’ll get this parsing error if you try –
parseError
parseErrorMessage

Turn On Exception Logging

Before that, you can check this post on how you can quickly go to the classic UI’s Settings area here – D365 Quick Tip: Shortcut to Settings from the Unified Interface

To be able to capture these details in the Plugin Profile entity, enable Plug-in and custom workflow activity tracing from the System Settings as shown below
turnOnLogging

You can’t add Plug-in Trace Logs to UCI

  1. Smarter way would be to add the Plug-in Trace Log entity to the UCI App itself and not having to go back to the classic UI. Unfortunately, you can’t do that.
    cantAddToUCI.png
    With that, we will have to go back to the Classic UI’s Settings > Plugin-In Profile Area to get out Profiled Log File.

Plug-In Trace Log

  1. Assuming you are back in the classic UI (maybe keep this open in another tab)
    Open the Trace Log record
    openProfileRecord.png
  2. Scroll down to the very bottom to find the Exception Details
    profiledData.png
  3. Now, copy that to the text file and attach it in the Plugin Registration Tool
    correctProfileFile.png
  4. This should work and you won’t get an error
    attached.png

Phew! I know this is lengthy. But we hope this will soon be eased 🙂

Hope this helps you!

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!