Posts

Showing posts from 2018

Add SharePoint Documents Associated Grid to Page

Recently I was looking for a way to add the SharePoint Documents Associated grid as an IFrame on a Dynamics form. Jason Lattimer's blog had the answer: https://jlattimer.blogspot.com/2017/01/show-sharepoint-documents-on-main-form.html

VSTS and SourceTree

Recently started using Git with VSTS and wanted to connect it up to Sourcetree.  This article by Adam Prescott helped me out.  You can view the article here: https://adamprescott.net/2015/01/29/visual-studio-online-and-sourcetree/

Dev Box Tools

AstroGrep   Fiddler   LINQPad   XRMToolkit   Team Foundation Sidekicks   WinDirStat   JustDecompile   CodeCompare   Search Everything SMTP Diag Tool HTML CheatSheet Right Click "Command Window here as Administrator" ScreenToGif - Screen, webcam and sketchboard recorder with an integrated editor.

Download SDK Tools for Dynamics V9.0+

Microsoft is no longer providing the entire SDK and samples as a download.  Instead they are hosting the samples on a their website and providing the sdk and tools on nuget. You can get the tools inside Visual Studio by adding the nuget package but if you just want to download them to a folder on your computer they also have provided a PowerShell script to help you do that too. https://docs.microsoft.com/en-ca/dynamics365/customer-engagement/developer/download-tools-nuget Sample code website: https://docs.microsoft.com/en-ca/dynamics365/customer-engagement/developer/sample-code-directory Here is a copy of the powershell script provided by Microsoft: 1. In your Windows Start menu, type Windows Powershell and open it. 2. Navigate to the folder you want to install the tools to. For example if you want to install them in a devtools folder on your D drive, type cd D:\devtools. 3. Copy and paste the following PowerShell script into the PowerShell window and press Enter. $so

Find Empty Methods in Visual Studio

Image
To find empty methods in Visual Studio search using the following regular expression. void\ .*\(*\)(\ |(\r\n))*{(\ |(\r\n))*}

Create Windows 10 VHD and Import as EC2 AMI

Image
In needing to test client configuration and keep them in the same domain as our server we recently needed to add some Windows 10 machines to EC2. It was a bit of a surprise that there were no AMIs available for Windows 10. Instead we needed to create our own VHD and import it as an AMI in our EC2 isntance. Prepare VM Download and install  Oracle VM Virtualbox Download your Windows 10 ISO file. Create a new Windows 10 VM When creating the hard drive make sure to choose the VHD format. I chose Fixed size for the storage on the hard disk.  I have not tried using Dynamic.    Give the hard drive at least 25GB go bigger if you can. Attach the ISO to your Virtual Machine and start it up. Run through the windows setup When prompted to either enter a windows account or a domain account choose domain account.  You will be promoted to create a new user and password, this new user will be a local administrator on the machine, make sure to save this information. After you have comp

Uploading Large Files into Amazon S3

I recently had to upload some VHDs to Amazon S3 and found myself going beyond the upload limits for the web upload.  In order to accomplish uploading the 50GB files I used the AWS Command Line Interface (CLI).  If you need to know how to install the CLI check here ( Install CLI ) 1. Open a command prompt As Administrator. 2. Make sure your CLI configuration is up to date. C:\Windows\System32> aws configure AWS Access Key ID: yourkey AWS Secret Access Key: youraccesskey Default region name [us-east-1]: yourregion Default output format [None]: json 3. Create your bucket on S3 if it's not already there. 4. Run the following command.  C:\Windows\System32> aws s3 cp c:\temp\yourfile.vhd s3://yourbucket/VHDs 5. After you run the command the output window will provide you feedback as to how much of your download is complete and your current upload speed. C:\Windows\System32> aws s3 cp c:\temp\yourfile.vhd s3://yourbucket/VHDs Completed 1.1 GiB/50 Gib (14.1 MiB/s)

Amazon AWS Command Line Interface (CLI) Install

Using CLI can make doing task in AWS much easier.  In order to get the CLI tool this is the setup i usually perform.  Instead of going the Python/PIP route as show here there is also an MSI installer you can use.  ( MSI Download Link for 32/64 Bit ) 1. Install Python.  Use Python 2.7.9+ or Python 3.4+ which will insure you get the PIP installer included.  If you are using a previous version of Python you will need to go through a separate setup procedure for PIP. https://www.python.org/downloads/windows/ 2. Open a command prompt As Administrator and run the following. C:\Windows\System32> pip install awscli 3. Test to make sure that the install was successful. C:\Windows\System32> aws --version aws-cli/1.11.84 Python/3.6.2 Windows/7 botocore/1.5.47 4. After you confirm it was installed you can go ahead and configure the properties for your connection. If you don't have your access/secret keys you can add a new one to your user account in the AWS online console. 

Filtering Down the CrmSvcUtil

Most of the time i use late bound but there are times when early bound makes things easier.  I needed to limit the size of the file so filtering down on just the entities i use was needed.  Luckily Eric Pool create a quick way to do this already. http://erikpool.blogspot.com/2011/03/filtering-generated-entities-with.html The only think i would add to this is that I am using it with CRM 2015 so I had to make sure that my VS project was set to .NET 4.5.2

Move Shelveset from One Branch to Another

Image
This can be useful if you start working on the wrong branch and need to move your uncommitted code to the correct branch. Pre-Reqs. -You will need to have the TFS Power Tools installed. https://www.microsoft.com/en-us/download/details.aspx?id=35775 -Make sure the path of your command prompt on your project path eg. c:\TFS\Rick.Wilson\Web Resources -Get latest on the source and target branches to avoid this error: "Unable to determine the workspace." -Create your shelveset and make sure you don't have any pending changes in either branch to avoid this error: "An item with the same key has already been added"  Instructions -Shelve your changes -Open a Visual Studio Command Prompt -Run the following command tfpt unshelve /migrate /source:"$/Project/CurrentBranch" /target:"$/Project/NewBranch" "Shelveset Name" -A shelveset details window will come up, click the Unshelv button. -Next the Unshelv/Merge window will come u