- Borrow the book (I use Libby, and so after borrowing, need to make sure I click on deliver to Kindle).
- Once you have claimed the book and added it to your account, and under account settings, click on manage "Content and Devices" (this should be the link https://www.amazon.com/hz/mycd/myx?_encoding=UTF8&ref_=ya_aw_mycd#/home/content/booksAll/dateDsc/)
- Click on the "..." Button next to your book
- Click on "Manage Family Library"
- Finally add it to your kids free time library.
Saturday, July 18, 2020
Sharing borrowed kindle library books with kids
Thursday, April 09, 2020
PowerBi - Attaching a Common Data Model Folder to a DataFlow - Error: path doesnt contain model.json
Here are some things to try:
- Make sure your url doesnt contain blob.core.windows.net.
- When I used the desktop app StorageExplorer and copied the path to the model.json file, then the path looked like: https://xxxxxx.blob.core.windows.net/cds-crmuat1/model.json
- The same file, the path through Azure portal's storage explorer was: https://xxxxxx.dfs.core.windows.net/cds-crmuat1/model.json.
The 2nd path worked, but the first one didnt. - Make sure your permissions are correct:

- In the screen shot above, what I had missed were:
- Adding myself to the owner role on the storage account directly. Its not enough to be in here via inheritance, you need to add yourself directly.
- Also I had to add myself to the "Storage Blob Data Owner" role.
- The ones in blue are what the documentation asks you to do: https://docs.microsoft.com/en-us/power-bi/service-dataflows-connect-azure-data-lake-storage-gen2#grant-permissions-to-power-bi-services
- The storage account used for CDM needs to be the exact same storage account used by PowerBi. As of writing this blog, this is a limitation of PowerBi that I hope they will remove.
- The storage account needs to be in the same tenant and also hosted in the same region as PowerBi.
- If you encounter an error when trying to save a DataFlow, make sure that there is a container/filesystem named PowerBi in that storage account.
Wednesday, March 25, 2020
Dynamics CRM - Alternate key fails with message "The statement has been terminated."

Look to see if you have a duplicate value in your key. Unfortunately, if you have more than 50k records, you cannot use fetchXml and either would need to load the data into a database or filter the list by date-range (but the latter option is not guaranteed to catch all the errors and so the db option is your best bet).
Here is a query to find dups based on accountNumber on account entity
It used to be one time that CRM used to throw an error message stating the key creation failed because of a duplicate key. In the latest version, its a rather unhelpful message.
Friday, March 20, 2020
git@github.com: Permission denied (publickey).
Under clone or download, "use https" instead of "use SSH".
Tuesday, January 07, 2020
Restarting a web-app using Logic Apps
- Create a logic app and add whatever trigger you need. (I used a recurrence based trigger, but you could use a HTTP request, etc).
- Add a new step and then look for Azure Resource Manager. Once you click on it, search for "Invoke" and pick the "Invoke Resource Operation" action.

- You will need to fill in the following parameters and here is how to find them:

- Subscription: This should be available in the drop-down. Else, its your subscription Id.
- Resource Group: The resource group in which your web-app resides
- Resource Provider: Microsoft.Web
This I figured out from this page: Resource providers for Azure services
Microsoft.Web because I needed to manage an App Service. - Short Resource Id: this I figured out by going to the "Properties" section of my App Service and its the in the "ResourceId".

The value will end up being something like "sites/xxxxxxx" - Action Name: Lets look at this param before the ClientAPIVersion.
The function we want to invoke is "Restart" which I found via the REST API documentation pages: https://docs.microsoft.com/en-us/rest/api/appservice/webapps
Restart: https://docs.microsoft.com/en-us/rest/api/appservice/webapps/restart
You can check out all the other parameters that one could provide. In this case, we dont need any additional parameters. - Client Api Version: This is date value and you can get it from the Restart API documenation page. Its called "API Version" and can be found at the top of the page. In my case, as of writing of this post the value was "2019-08-01".
- Final result will look like this:

- Test it out by clicking run.
Wednesday, October 09, 2019
Querying Dynamics CRM using PowerBi - Query Folding
As an example:
When you look at the query in the Advanced Editor, this is what it shows:
let
Source = Cds.Entities("https://xxxx.api.crm.dynamics.com/api/data/v9.1/", [ReorderColumns=null, UseFormattedValue=null]),
entities = Source{[Group="entities"]}[Data],
territories = entities{[EntitySetName="territories"]}[Data],
#"Filtered Rows" = Table.SelectRows(territories, each [createdon] > #datetimezone(2019, 10, 1, 0, 0, 0, -6, 0)),
#"Removed Other Columns" = Table.SelectColumns(#"Filtered Rows",{"createdon", "name"})
in
#"Removed Other Columns"
And this is the query that goes out (removed url encoded characters for legibility):
/api/data/v8.2/territories?$filter=createdon gt 2019-10-01T00:00:00-06:00&$select=territoryid,createdon,name&$top=1000
As you can see, even though the query was broken out over 4 steps, there was only one call that went out to CRM, which is very cool!
Thursday, May 23, 2019
Merge options provided by Visual Studio DevOps
| Merge (no fast forward) Nonlinear history preserving all commits git merge pr where “pr” is the name of the branch. | |
| Squash Commit (in AWS CodeCommit this is called Squash and Merge) Linear history with only a single commit on the target Deleting the source branch when squashing is recommended git merge pr --squash | |
| Rebase (in AWS CodeCommit this is called Fast Forward Merge) Linear history with all commits rebased onto the target git rebase master git merge pr --ff-only | |
| Semi-linear merge (in AWS CodeCommit this is called 3-way Merge) Rebase source commits onto target and create a two-parent merge git rebase master git merge pr --no-ff |
For more info:
Wednesday, March 20, 2019
PowerBi DataFlows–Filtering by Date
The cool feature of incremental refresh is only available to PowerBi Premium instances. So, what do the poor folk do? Well, we fake it!
The following is based on Dynamics CRM data, which provides the modifiedon field for all entities, but it can be extended to use any date field. You simply use the Table.SelectRows function to filter based on the ModifiedOn field. (the example shows how I did it on the “SystemUser” entity).
let
Source = Cds.Entities(https://xxxxx.crm.dynamics.com, null),
#"Navigation 1" = Source{[Group = "entities"]}[Data],
#"Navigation 2" = #"Navigation 1"{[EntitySetName = "systemusers"]}[Data],
#"Changed column type" = Table.TransformColumnTypes(#"Navigation 2", {{"modifiedon", type datetime}}),
#"Filtered By Date" = Table.SelectRows(#"Changed column type", each DateTime.From([modifiedon]) >= DateTime.From("2018-01-01"))
in
#"Filtered By Date"
Tuesday, March 05, 2019
Tuesday, February 19, 2019
Account limits for Application Users in Dynamics 365
All application users are created with a non-interactive user account, however they are not counted towards the five non-interactive user accounts limit. In addition, there is no limit on how many application users you can create in an instance.
https://docs.microsoft.com/en-us/dynamics365/customer-engagement/admin/create-users-assign-online-security-roles#create-an-application-user
https://github.com/MicrosoftDocs/dynamics-365-customer-engagement/commit/9068938aa7ca91f12b8744518bf5071ec4514530#diff-184905bb3786c535b8e1eedb5ba54cf2R258
And for the steps to create the Application user, see: https://blog.aggregatedintelligence.com/2017/02/headless-authentication-against-crm-365.html






