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!

Advertisements

Business Card Scan in D365 CE Wave 2 Updates

We are close to getting D365 Wave 2 Updates in Oct 2019 and with Early Opt-in to Wave 2 Updates, we are already able to access one of the most desired and requested features of this release – Business Card Scan!

If you are yet to enable Wave 2 Updates for your organization, follow me post on the same here – Early Opt-in for October 2019 Wave 2 Updates. Please do so only on your testing/sandbox environment and not on Production instance yet.

Note that this is only available in US and EU regions as of now and works only in the Unified Interface.

Phone App to scan business cards

Most obvious thing to do is to pull out a phone to scan a card.

  1. Open Dynamics 365 for phones app. And navigate to Quick Create Menu
    qcMenu.png
  2. Then, select Contact
    contactQC
  3. On the Quick Create of Contact form, you’ll see a Business Card control that opens the Camera
    businessCardButton
  4. It will open you Camera and you can simply take a picture of the business card itself like below
    picTaken
  5. It will upload and fill out all the captured information from the card to the Contact form.
    infoCaptured
  6. You can simply Save the record and you’re done. It will be uploaded to CRM.

 

Uploaded

And here it is, uploaded in CRM already.

enteredInCRM

And if you take a look at the record, the picture that was used is also stored in Dynamics
cardInfo

Custom Control Used

If you look at the form customization of the Contact’s Quick Create form, you can see what control was used. It’s AI Builder Business Card control
controlUsed

Hope this helps!

Qualify Lead in D365 CE: Select which entity records should be created

Wave 2019 Updates brought some really sought-after features. Another one which I would like to bring up is the Lead Qualification experience.

I’ve written this post when I enabled the Early Opt-in of Wave 2 Oct 2019 Updates. To enable Early Opt-in, please refer this post – Early Opt-in for October 2019 Wave 2 Updates

This is set to release for the Oct 2019 Updates.

Default Behavior

So when you Qualify Lead by default – Account, Contact and Opportunity records are created.
fullQualifyLead

Notice that by default, the created Account and Contact are always auto-filled.
all3Records

Lead Qualify Experience in System Settings

By default, D365 will let you create all three – Account, Contact and Opportunity records when you Qualify a Lead.
originalSetting

When you select No, you’ll be asked which all entities should be created when you Qualify a Lead.
selectNo

 

Lead Qualification for selected entities

No, when you click on Qualify button, you’ll be treated with this Dialog box where you can choose what records should be created.

I’ll select only Opportunity this time
selectWhichOnes

 

And only Opportunity will be created and notice that the Contact and Account are blank this time.
blankOpp

Hope this is useful!

Thanks.

Related Blog on one of Wave 2 2019 Update: Customize Opportunity Close dialog box in D365 CE v9 Unified Interface – Wave 2 update

I’m also listed on the Top 100 CRM Blogs and Websites on Feedspot. It has a curated list of awesome bloggers.

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!

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

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!

Fix Ribbon icons on the Unified Interface in D365 CE

So, since adoption of Unified Interface is growing, people are asking – “What happened to the Ribbon icons?”. Well, a simple answer to this is tweaking the implementation a little.

Typically, you have custom icons on your classic Web UI that look like this –
classicIcon

But the same looks like a puzzle piece in the Unified Interface –
puzzlePiece

So, here’s what you need to do. Icons on the Unified Interface take SVG format. You’ll need to take you existing PNG Web Resources

 

Creating SVG Icons

Like most online services or applications, you can easily convert images to SVG. In this example, I’m using this online tool – https://www.online-convert.com/

Or you can try this too which I found quite a few people recommended – https://www.syncfusion.com/downloads/metrostudio

For this example, I used https://convertio.co/png-svg/ And I got my converted SVG document downloaded.
Now, create a new Web Resource in SVG and Upload the same.
svgWebResource

Ribbon Workbench

Once your Web Resource for the SVG format is set, going back to your Ribbon Workbench customization work space, go to the Button where you wan to update the icon and select the SVG Web Resource under Modern Image as shown below

modernImage

Publish Changes and See

Once your customization are published, you can simply refresh and check that your image has been updated

converted
Note: An online converted might not give you an accurate image. However, it is best recommended to create SVGs on an app. I’ve heard recommendations about https://www.syncfusion.com/downloads/metrostudio

Hope this helps!