Skip to main content

Posts

Showing posts from December, 2017

Dynamics Set IFrame URL - D365 v8 vs. D365 v9

While doing client work, I came across a problem with setting an IFrame URL dynamically.  The underlying issue was that the sandbox instance is on v8 of Dynamics 365 and production is on v9 of Dynamics 365.  The reason for this was because this client was setup around the time that Microsoft rolled out v9.  Anyways, JavaScript that I wrote to dynamically set the URL of the IFrame wasn't working in the v9 instance.  This was because of changes that Microsoft made to how IFrames are loaded on the form and also changes to JavaScript. Here is my v8 setup: JavaScript runs OnLoad of contact form.  This works because of how IFrames are loaded in v8.  You can also run it on either a tab change (hide / show) or OnReadyStateComplete event of the IFrame.  Depending on your setup you will need to choose which is best for you.  For me in this case it was the OnLoad event. Here is the JavaScript: function OnLoad() { //Get memberid var...

Using Stream Deck with SCRIBE

Because I am doing a lot of work with SCRIBE Online, I find myself trying to come up with solutions to speed up my work.  One solution I came up with is using my Stream Deck to automate some of the commands I type within SCRIBE Online.  Before we go to far let me bring you up to speed on what the Stream Deck is. The Stream Deck is manufactured by elgato.  It is a small 15 key keyboard that can be customized.  What I like about it is how the keys are clean looking and can be easily changed by the application.  This hardware is marketed towards video editors and game streams (both of which I don't do).   I got it because of the number of keys it has, the ease at which you can update it, and because I didn't want to use macro's on another external keyboard with paper labels stuck on the keys. I will say that I am not only using the Stream Deck for just SCRIBE, but other applications like Visual Studio, Microsoft Windows shortcut keys, and to launch o...

Lookup Tables

While creating data mappings you may run into the need to store some variables in a table in a Key \ Value Pair.  This way you can call the variable by its Key to get the Value and pass it to the other system.  This is helpful when the 2 systems store data in different ways.  An example of this would be a table that stores United States abbreviations as the key and the full state name as the value.  This is helpful when the source stores the full state name and the target stores the abbreviation or visa versa.  So how do we set this up? 1) In the navigation bar click on "MORE". 2) Click on "Lookup Tables". 3) Click on the "+" sign on the right hand side. 4) In the pop-up input a Name. 5) On the ellipses button on the right under Description you will get a dropdown with "Create", "Append" and "Export".      5.1) Create - Click this to create a new Key / Value Pair in the table.      5.2) Append - If you have a CSV file ...

Option Set Helper Code

When it comes to working with Option Sets while creating a plugin, custom workflow activity or other extension to CRM, it can sometimes be a pain to get the label of the Option Set.  There are many solutions out there on how to accomplish this, but for the most part they were not reliable.  So after doing a bunch of research online and going through the SDK I came up with 4 methods that help me when I am working with Option Sets.  There are 2 for global option sets and 2 for local option sets.  The reason there are 2 for each is because one method will return the value and the other will return the label. 1) Get Local Option Set Label - This method will return the label of the option set value you provide it. /// <summary> /// Method to get local option set label /// </summary> /// <param name="entityLogicalName">Schema name of entity</param> /// <param name="optionSetName">schema name of the optionse...

XrmToolBox Bulk Attachment Manager - Version 1.0.1.0

I am pleased to announce that today I have published version 1 of my Bulk Attachment Manager plugin for XrmToolBox.  This is an open source plugin that I created because I had a need multiple times to migrate attachments out of CRM and into another system.  because of the way CRM stores attachments in the database, migrating these are sometimes hard said then done.  So to make this process easy I came up with this tool.  Before I go any further I am sure you want the important links so you can take a look.  Here they are: GitHub Project Project Wiki Nuget Package Right now, this plugin can only download note attachments from CRM.  In future releases I will turn on email attachment downloads and note attachment uploads (notes will need to already exist in the system).  To download note attachments, you have 2 options and that is to either download all note attachments or only select note attachments.  To download only select note attachments,...

Using SCRIBE Online For Scheduled Tasks

While doing client work, I ran into a need where we needed to scan for records where a date value is 3 months in the future (i.e. 3 months from today) in Microsoft Dynamics 365.  There are a few options to accomplish this: Microsoft Dynamics 365 SDK (Developer Guide) Timed workflows SCRIBE Online The issue with using the Microsoft Dynamics 365 SDK (Developer Guide) is you need a software developer to create a console application that is linked to a Windows scheduled task to run every night to connect to CRM, query the records and make the changes.  This means if you need any updates to the application you need to developer to change source code.  This is a viable option if you have an internal development team that can support the application. When it comes to using timed workflows with wait statements, we would need to have the workflow fire at a specific time in the record.  In this scenario, this means that the workflow needs to fire to start the coun...