Create new Sandbox and copy Production over to it in PowerPlatform Admin Center

This is one of the standard approaches if you want to copy over a Production instance over to a Sandbox one. Most common scenarios being when you’ve on-boarded a new client to Dynamics 365 / PowerPlatform and you’re nearing Go Live for the first time!

You need a Sandbox to then follow new customization on the Sandbox and avoid doing anything on the Production. Here’s how you copy over from Production to Sandbox!

 

Creating a Sandbox

  1. Create a new Environment by clicking on the +New button as below
    newButton.png
  2. Now, you can directly create a new Sandbox environment in the PowerPlatform Admin Center (https://admin.powerplatform.microsoft.com/environments)
    Remember: Both the source and target environments need to be in the same region to copy.
    createSandbox.png
  3. Additionally, I’ve selected the Create a Database option too since I want to speed up the process.
    addingDatabase.png
    Note that you can chose which all apps you want to deploy if you chose Enable Dynamics 365 apps

And that’s it. You’ll need to wait for some time until this is processed!

If you’re also looking to create a Database explicitly for an existing environment using a previous method, you can check this post – Create new CDS Environment and Database quickly from PowerApps Admin Center

While this happens in the background, you can see the message on the Environments section on the Power Platform Admin Center
preparing.png

 

And upon completion, you’ll see the below message
completedCreation.png

Copying From Production to Sandbox

Next step is to copy over the Production to the newly created Sandbox environment.

  1. Select the Production environment you want to copy over and look at the ribbon, you’ll see a copy button.
    copyButton.png
  2. Once you click on the Copy, you’ll be asked about the target environment, chose the created Sandbox.
    selectTarget.png
  3. Once you confirm, the copying process will start. And you’ll be taken to this page which tells you what stage the process is in –
    currentProcess.png
  4. Once all the copying is completed, this notification will appear. Now, the next step is to turn off Administration Mode. Click on settings link as shown below by arrow.
    copySuccess.png
  5. Once you flick the switch and Save, Administration Mode will be disabled letting others to log in as well. Additionally, now we have the option to keep Background Operations On as well while keeping Administration Mode On as well.
    disableAdminMode.png

Now, you are all set. Hope this helps!

Advertisement

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!

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!

D365 Quick Tip: Simple & Detailed Mode in Advanced Find

If you ever wanted to refine your Personal Settings and ever came across this setting that asks your to set the default mode in Advanced Find
setting

But didn’t observe the Advanced Find well? Here’s what it does

Simple Mode

As per Advanced Find behavior, the view which you are on is pre-selected in the Advanced Find.

And observe that the query is locked and you actually need to click on Details to expand it or make it editable
simpleMode

And then it expands like this
expanded

Detailed Mode

In Detailed mode, if you click on Advanced Find button, the query will already be in detailed view ready for you to be edited directly without you needed to click on Details as in Simple mode
advancedMode

 

Hope this quick tip saves you that extra bit of second. 🙂

D365 Quick Tip: Bulk Clear field values

A very handy approach for admins and users of Dynamics 365 who want to bulk clean up field values – And just selecting them in Bulk Editing them as shown below doesn’t help!!

So here’s the scenario – You want to clear the selected records for their Credit Score field
containsData

Because primarily, you can commonly put a value in a field using Bulk Edit, but not clear the value.

 

Workaround

What you can do instead, create a quick and simple workflow to clear the field.

  1. Create an On-Demand workflow on Contact entity with an Update step for Contact
    workflowBody
  2. In the Update step, point to the field and then select the Operator on the right hand side to select Clear
    operator
  3. Make sure the Clear appears on the field you want to Bulk Update
    clearField
  4. Once done, save and Activate the workflow. Run on the selected records you want to clear at once
    runWorkflow
  5. The values will now be cleared for these records
    cleared

Hope this helps!

Failed to Generate Excel error when trying to Export Data from Advanced Find

Here is the most common issues seen while trying to Export data to Excel from an Advanced Find view. And you end up seeing this error which says ‘Failed to Generate Excel’ –

error

Getting the Error

  1. So this is what you typically do – When you run an Advanced Find and click on Export when you see the results
    exportofaccounts
  2. Or, when you are in an entity’s view and you want to Export to Excel right from the ribbon button like this –
    exportfromview
  3. But, as soon as the File is being generated and you feel you’re there –
    generating
  4. You see this –
    error

 

Culprit

The reason for this is – Redundant Display Names of the fields used in the View you are exporting
duplicatedisplaynames

How to catch this

The easiest way to catch this is trying to Export the view to Excel Online, this will give you the exact error
exacterror
The Downloaded Log File won’t help much in identifying the column that is duplicate though, you’ll need to go through the Columns manually to check

 

Hope this helps! 🙂

 

Linear Slider Custom Control in D365 v9.x UCI

Using Custom Controls is the new cool in Dynamics 365. Specifically, if visual cue of approximation or ‘to what extent’ is priority over the textual/numeric data, using Custom Control is the best way forward.

Something like this –

featured

Use Case

In my use case, I want to know the client budget so that I keep Quotes for them around the range they can afford.

Now, number will give me an idea. But a visual cue of the same will let me know the spending capacity of the client in the bigger picture.

So, I’ll use Linear Slider custom control on the Client Budget currency field to show a slider as well as the currency value.

Enabling Linear Slider on Currency Field

  1. So here, Client Budget (new_clientbudget) is my Currency type of field in D365.
  2. On the Form Editor, I’ll go to Properties of the field and go to Controls. Click on Add Control…
    addcontrol

  3. Select Linear Slider among others and click Add.
    addslider
  4. Then, I’ll set the properties of the control. Make sure you enable them for Web, Phone and Tablet as per your preferences.
    sliderproperties
  5. I’ve set the min and max range for the control, also that step which should reflect while moving the slider.
  6. Finally, click OK and publish changes.

 

Linear Slider

featured

You can even input custom number in the box and the slider will set to it.

manualnumber

 

Hope this was useful! 🙂

Thanks for reading.

D365 Quick Tip: Choose how currency field is displayed

In D365 CE Apps, you have 2 options to display the currency fields, by symbol or by the currency code.

Symbolic representation

symbolic

Currency Code representation

coded

Setting

With a simple setting, you can apply this change organization wide. Navigate to Settings > Administration > System Settings and under General tab, look for Set the currency display option.
setting

Pretty simple! 🙂

Restrict User Access to a D365 instance using Security Groups

Use Case

You have multiple instances and you don’t want every member with a D365 license to be able to access each of those environments. How do you tackle this? Answer is using Security Groups on the Environments and Users.

Creating Security Group

In Office 365, create a Security Group and add members to it who should have access to the desired environment.

  1. Navigate to Groups in Office 365 and create a New Group. Give it a suitable name.
    creategroup
    groupname
  2. Add members to the Group who should have access. Click on Edit as shown below to Add members to the group and select the members and save it.
    editmembers
    addmembers
    membersadded
  3. Your Security Group is ready.
    securitygroupready

Apply Security Group to the D365 instance

  1. Navigate to Dynamics 365 Admin Center and select Edit on the instance you want to apply the Security Group on.
    editinstance
  2. Select the Security Group field and select the Security Group you created.
    selectsecuritygroup
  3. Click Next.
    clicknext
  4. Save once confirmed that you have selected the correct Security Group.
    saveinstance
    That’s it.

Who all can access the environment

All those are a part of the Security Group applied to the instance will have access to the environment including the Global Administrator
enabledusers

Rest of the users will be in the Disabled Users list
disabledusers

And if they try to access the environment, they will not be able to and will see this –
accessdenied

Hope that was easy! 🙂