Menu Close

Blog

Slide 1

Microsoft Business Applications Blogposts, YouTube Videos and Podcasts

Helping Businesses with Technology

Slide 2

Microsoft Business Applications Blogposts, YouTube Videos and Podcasts

Helping Businesses with Technology

Slide 3

Microsoft Business Applications Blogposts, YouTube Videos and Podcasts

Helping Businesses with Technology

previous arrow
next arrow

HOW TO VIEW RIBBON DEFINITIONS IN CRM 2011

<script async src=”//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js”></script>
<script>
  (adsbygoogle = window.adsbygoogle || []).push({
    google_ad_client: “ca-pub-9875394259905116”,
    enable_page_level_ads: true
  });
</script>





Previously the SDK contained ribbon definition XML files in a folder at the following location:

The latest SDK seems to no longer include these files.  So, now you need to generate these yourself using the utility provided.  It’s not hard to do, here’s the steps:
Go to this location:
Double-click the solution file (exportribbonxml.sln) to open this solution in Visual Studio.
Right-click on the Solution in Visual Studio and select Build:
image
Wait for that process to complete and make sure Visual Studio doesn’t report any errors.  If that all went ok you will now have an exe you can run, at the following location:
Double click on the exe (ExportRibbonXml.exe) and then provide the details asked of you:
image
And that should generate the ribbon definition files that you need:
image
Share this:

ADDING A BUTTON TO A MS CRM FORM

Adding a Button to a CRM 2011 Form Ribbon

Here’s a shortcut guide to customising the Form ribbon in CRM 2011.  Rather than explaining all of the intricacies of the ribbon here’s a set of instructions that will get a button added to a form with the least amount of steps/complexity.  In this scenario we will add a button to the Account form that will launch an external web page (if you prefer the button executes a jscript function keep reading as I cover that as well)… 
Here’s the steps:
1. Create a new Solution called Ribbon.
2. Add to your Solution the Account entity and then export the Solution.
3. Determine the location ID for where you want your button to sit (note: this take a bit of research, keep reading…)
3a. Download and install the CRM SDK.  Then go to the following SDK folder:
sdksamplecodecsclientribbonexportribbonxmlexportedribbonxml
Here you will see Ribbon definitions for each entity (e.g. accountribbon.xml)
[UPDATE: 14 Dec 2011 – The latest SDK did not include the ribbon definition XML files forcing you to build and run an app from source code provided in order to generate them for your self. I provide instructions on this process here]
3b. Open accountribbon.xml in Visual Studio.
Now we need to find the relevant bit of XML that defines the ribbon component we want to customise.  Each entity has ribbon definitions for it’s form ribbon (“Form”), for the ribbon that appears when the entity’s grid view is selected from the main CRM menu (“HomePageGrid”) and for the ribbon that appears when the entity is displayed as an in-line grid on either a dashboard on another entity’s form (“SubGrid”).  You will see Tab definitions for each of this:
image
We are interested in the Form ribbon so minimise the other XML elements and have a look at the Tab definitions for the Account Form.  You will see 3 tabs are defined:
image
These are the definitions behind the “Account”, “Add” and “Customize” tabs you see when looking at the Account form in CRM:
(Note: As the “File” tab is generic it is defined in the application.ribbon.xml rather than inside each entity’s ribbon xml file)
image
The Tab that we want is the one that appears as “Account”.  The Tab definition for this is:
Tab Id=”Mscrm.Form.account.MainTab”
(Note: look at the Buttons defined under each Tab  to help figure out the correct Tab)
To add a button to the CRM ribbon we need to specify a location.  The value we need is the “Controls Id”.   Find the button you want your button added next to and grab the “Controls ID” that button sits under.  We will add our button to the “Process” Group next to the “Run Workflow” button so the Controls ID value we want is:
Controls Id=”Mscrm.Form.account.MainTab.Workflow.Controls”
image
3c. Copy the Controls Id value to NotePad
3d.  Close accountribbon.xml
That’s our research done, let’s get back to defining our button…

4. Open the customisation.xml file that was included in your exported Solution zip file (open in Visual Studio).
5. From the XML menu, click Schemas and then add from .. sdkschemas the 3 xsd files that have “ribbon” in their name and also customizationssolution.xsd (this gives us intellisense)
7. Back in the main window of VS do a Find on “RibbonDiff” and then swap out: “<CustomActions />”  with:





01


02


03


04


05


06


07


08


09


10


11


12


13


14


15


16


17



<CustomActions>


  <CustomAction Id="GT.account.Form.Star.CustomAction"


                Location="Mscrm.Form.account.MainTab.Workflow.Controls._children"


                Sequence="1">


    <CommandUIDefinition>


      <Button Id="GT.account.Form.Star.Button"


              Command="GT.account.Form.Star.Command"


              LabelText="Star"


              ToolTipTitle="Tip"


              ToolTipDescription="This is a Star"


              TemplateAlias="o1"


              Image16by16="$webresource:new_star16x16"


              Image32by32="$webresource:new_star32x32"


      />


    </CommandUIDefinition>


  </CustomAction>


</CustomActions>





If you want to deviate from my scenario of customising the Account form the relevant bit in the above is the Location reference.  This is where the Controls ID value that we we obtained from our research goes.  Note: The Controls ID value needs to be appended with “._children” e.g.:
Location=”Mscrm.Form.account.MainTab.Workflow.Controls._children”
8.  If you have 16×16 and 32×32 icons for your button go and add those into CRM as web resources and then change the references in the above code snippet.  Otherwise, remove theImage16by16 and Image32by32 lines (they’re optional, the button will still show).
9. Scroll down a bit and replace: “<CommandDefinitions />”  with:





1


2


3


4


5


6


7


8


9


10


11



<CommandDefinitions>


  <CommandDefinition Id="GT.account.Form.Star.Command">


    <EnableRules>


    </EnableRules>


    <DisplayRules>


    </DisplayRules>


    <Actions>


      <Url Address="http://www.google.com" />


    </Actions>


  </CommandDefinition>


</CommandDefinitions>





10.Adjust the Url reference to whatever you want.  You can use use a relative reference if you want to launch a CRM URL or an HTML page you have loaded into CRM.
or:
If you want to execute a jscript function instead swap out the <Actions> node with a jscript web resource and function name reference like the below:





1


2


3


4


5



<Actions>


  <JavaScriptFunction Library="$webresource:new_getcontact"


                      FunctionName="NewCaseOnClick"


                      />


</Actions>





11. Save your customisation.xml changes.
12. Re-zip your unzipped solution back into a solution zip file, import, publish all and then refresh your browser.
Done.  Smile
End result:
image
This solution is available for download in both managed and unmanaged formats.
Share this:

ADDING A BUTTON TO A MS CRM FORM

Adding a Button to a CRM 2011 Form Ribbon

Here’s a shortcut guide to customising the Form ribbon in CRM 2011.  Rather than explaining all of the intricacies of the ribbon here’s a set of instructions that will get a button added to a form with the least amount of steps/complexity.  In this scenario we will add a button to the Account form that will launch an external web page (if you prefer the button executes a jscript function keep reading as I cover that as well)… 
Here’s the steps:
1. Create a new Solution called Ribbon.
2. Add to your Solution the Account entity and then export the Solution.
3. Determine the location ID for where you want your button to sit (note: this take a bit of research, keep reading…)
3a. Download and install the CRM SDK.  Then go to the following SDK folder:
sdksamplecodecsclientribbonexportribbonxmlexportedribbonxml
Here you will see Ribbon definitions for each entity (e.g. accountribbon.xml)
[UPDATE: 14 Dec 2011 – The latest SDK did not include the ribbon definition XML files forcing you to build and run an app from source code provided in order to generate them for your self. I provide instructions on this process here]
3b. Open accountribbon.xml in Visual Studio.
Now we need to find the relevant bit of XML that defines the ribbon component we want to customise.  Each entity has ribbon definitions for it’s form ribbon (“Form”), for the ribbon that appears when the entity’s grid view is selected from the main CRM menu (“HomePageGrid”) and for the ribbon that appears when the entity is displayed as an in-line grid on either a dashboard on another entity’s form (“SubGrid”).  You will see Tab definitions for each of this:
image
We are interested in the Form ribbon so minimise the other XML elements and have a look at the Tab definitions for the Account Form.  You will see 3 tabs are defined:
image
These are the definitions behind the “Account”, “Add” and “Customize” tabs you see when looking at the Account form in CRM:
(Note: As the “File” tab is generic it is defined in the application.ribbon.xml rather than inside each entity’s ribbon xml file)
image
The Tab that we want is the one that appears as “Account”.  The Tab definition for this is:
Tab Id=”Mscrm.Form.account.MainTab”
(Note: look at the Buttons defined under each Tab  to help figure out the correct Tab)
To add a button to the CRM ribbon we need to specify a location.  The value we need is the “Controls Id”.   Find the button you want your button added next to and grab the “Controls ID” that button sits under.  We will add our button to the “Process” Group next to the “Run Workflow” button so the Controls ID value we want is:
Controls Id=”Mscrm.Form.account.MainTab.Workflow.Controls”
image
3c. Copy the Controls Id value to NotePad
3d.  Close accountribbon.xml
That’s our research done, let’s get back to defining our button…

4. Open the customisation.xml file that was included in your exported Solution zip file (open in Visual Studio).
5. From the XML menu, click Schemas and then add from .. sdkschemas the 3 xsd files that have “ribbon” in their name and also customizationssolution.xsd (this gives us intellisense)
7. Back in the main window of VS do a Find on “RibbonDiff” and then swap out: “<CustomActions />”  with:





01


02


03


04


05


06


07


08


09


10


11


12


13


14


15


16


17



<CustomActions>


  <CustomAction Id="GT.account.Form.Star.CustomAction"


                Location="Mscrm.Form.account.MainTab.Workflow.Controls._children"


                Sequence="1">


    <CommandUIDefinition>


      <Button Id="GT.account.Form.Star.Button"


              Command="GT.account.Form.Star.Command"


              LabelText="Star"


              ToolTipTitle="Tip"


              ToolTipDescription="This is a Star"


              TemplateAlias="o1"


              Image16by16="$webresource:new_star16x16"


              Image32by32="$webresource:new_star32x32"


      />


    </CommandUIDefinition>


  </CustomAction>


</CustomActions>





If you want to deviate from my scenario of customising the Account form the relevant bit in the above is the Location reference.  This is where the Controls ID value that we we obtained from our research goes.  Note: The Controls ID value needs to be appended with “._children” e.g.:
Location=”Mscrm.Form.account.MainTab.Workflow.Controls._children”
8.  If you have 16×16 and 32×32 icons for your button go and add those into CRM as web resources and then change the references in the above code snippet.  Otherwise, remove theImage16by16 and Image32by32 lines (they’re optional, the button will still show).
9. Scroll down a bit and replace: “<CommandDefinitions />”  with:





1


2


3


4


5


6


7


8


9


10


11



<CommandDefinitions>


  <CommandDefinition Id="GT.account.Form.Star.Command">


    <EnableRules>


    </EnableRules>


    <DisplayRules>


    </DisplayRules>


    <Actions>


      <Url Address="http://www.google.com" />


    </Actions>


  </CommandDefinition>


</CommandDefinitions>





10.Adjust the Url reference to whatever you want.  You can use use a relative reference if you want to launch a CRM URL or an HTML page you have loaded into CRM.
or:
If you want to execute a jscript function instead swap out the <Actions> node with a jscript web resource and function name reference like the below:





1


2


3


4


5



<Actions>


  <JavaScriptFunction Library="$webresource:new_getcontact"


                      FunctionName="NewCaseOnClick"


                      />


</Actions>





11. Save your customisation.xml changes.
12. Re-zip your unzipped solution back into a solution zip file, import, publish all and then refresh your browser.
Done.  Smile
End result:
image
This solution is available for download in both managed and unmanaged formats.
Share this:

ADDING A BUTTON TO A MS CRM FORM

Adding a Button to a CRM 2011 Form Ribbon

Here’s a shortcut guide to customising the Form ribbon in CRM 2011.  Rather than explaining all of the intricacies of the ribbon here’s a set of instructions that will get a button added to a form with the least amount of steps/complexity.  In this scenario we will add a button to the Account form that will launch an external web page (if you prefer the button executes a jscript function keep reading as I cover that as well)… 
Here’s the steps:
1. Create a new Solution called Ribbon.
2. Add to your Solution the Account entity and then export the Solution.
3. Determine the location ID for where you want your button to sit (note: this take a bit of research, keep reading…)
3a. Download and install the CRM SDK.  Then go to the following SDK folder:
sdksamplecodecsclientribbonexportribbonxmlexportedribbonxml
Here you will see Ribbon definitions for each entity (e.g. accountribbon.xml)
[UPDATE: 14 Dec 2011 – The latest SDK did not include the ribbon definition XML files forcing you to build and run an app from source code provided in order to generate them for your self. I provide instructions on this process here]
3b. Open accountribbon.xml in Visual Studio.
Now we need to find the relevant bit of XML that defines the ribbon component we want to customise.  Each entity has ribbon definitions for it’s form ribbon (“Form”), for the ribbon that appears when the entity’s grid view is selected from the main CRM menu (“HomePageGrid”) and for the ribbon that appears when the entity is displayed as an in-line grid on either a dashboard on another entity’s form (“SubGrid”).  You will see Tab definitions for each of this:
image
We are interested in the Form ribbon so minimise the other XML elements and have a look at the Tab definitions for the Account Form.  You will see 3 tabs are defined:
image
These are the definitions behind the “Account”, “Add” and “Customize” tabs you see when looking at the Account form in CRM:
(Note: As the “File” tab is generic it is defined in the application.ribbon.xml rather than inside each entity’s ribbon xml file)
image
The Tab that we want is the one that appears as “Account”.  The Tab definition for this is:
Tab Id=”Mscrm.Form.account.MainTab”
(Note: look at the Buttons defined under each Tab  to help figure out the correct Tab)
To add a button to the CRM ribbon we need to specify a location.  The value we need is the “Controls Id”.   Find the button you want your button added next to and grab the “Controls ID” that button sits under.  We will add our button to the “Process” Group next to the “Run Workflow” button so the Controls ID value we want is:
Controls Id=”Mscrm.Form.account.MainTab.Workflow.Controls”
image
3c. Copy the Controls Id value to NotePad
3d.  Close accountribbon.xml
That’s our research done, let’s get back to defining our button…

4. Open the customisation.xml file that was included in your exported Solution zip file (open in Visual Studio).
5. From the XML menu, click Schemas and then add from .. sdkschemas the 3 xsd files that have “ribbon” in their name and also customizationssolution.xsd (this gives us intellisense)
7. Back in the main window of VS do a Find on “RibbonDiff” and then swap out: “<CustomActions />”  with:





01


02


03


04


05


06


07


08


09


10


11


12


13


14


15


16


17



<CustomActions>


  <CustomAction Id="GT.account.Form.Star.CustomAction"


                Location="Mscrm.Form.account.MainTab.Workflow.Controls._children"


                Sequence="1">


    <CommandUIDefinition>


      <Button Id="GT.account.Form.Star.Button"


              Command="GT.account.Form.Star.Command"


              LabelText="Star"


              ToolTipTitle="Tip"


              ToolTipDescription="This is a Star"


              TemplateAlias="o1"


              Image16by16="$webresource:new_star16x16"


              Image32by32="$webresource:new_star32x32"


      />


    </CommandUIDefinition>


  </CustomAction>


</CustomActions>





If you want to deviate from my scenario of customising the Account form the relevant bit in the above is the Location reference.  This is where the Controls ID value that we we obtained from our research goes.  Note: The Controls ID value needs to be appended with “._children” e.g.:
Location=”Mscrm.Form.account.MainTab.Workflow.Controls._children”
8.  If you have 16×16 and 32×32 icons for your button go and add those into CRM as web resources and then change the references in the above code snippet.  Otherwise, remove theImage16by16 and Image32by32 lines (they’re optional, the button will still show).
9. Scroll down a bit and replace: “<CommandDefinitions />”  with:





1


2


3


4


5


6


7


8


9


10


11



<CommandDefinitions>


  <CommandDefinition Id="GT.account.Form.Star.Command">


    <EnableRules>


    </EnableRules>


    <DisplayRules>


    </DisplayRules>


    <Actions>


      <Url Address="http://www.google.com" />


    </Actions>


  </CommandDefinition>


</CommandDefinitions>





10.Adjust the Url reference to whatever you want.  You can use use a relative reference if you want to launch a CRM URL or an HTML page you have loaded into CRM.
or:
If you want to execute a jscript function instead swap out the <Actions> node with a jscript web resource and function name reference like the below:





1


2


3


4


5



<Actions>


  <JavaScriptFunction Library="$webresource:new_getcontact"


                      FunctionName="NewCaseOnClick"


                      />


</Actions>





11. Save your customisation.xml changes.
12. Re-zip your unzipped solution back into a solution zip file, import, publish all and then refresh your browser.
Done.  Smile
End result:
image
This solution is available for download in both managed and unmanaged formats.
Share this:

HOW TO SHARE THE FILES FROM WINDOWS TO VIRTUAL MACHINE

How-To Geek

How to Share Your Computer’s Files With a Virtual Machine

access-host-operating-system-folders-in-virtualbox-virtual-machine
Virtual machines are isolated containers, so the guest operating system in the virtual machine doesn’t have access to your computer’s file system. You’ll have to set up shared folders in a program like VirtualBox or VMware to share files.
To help the guest operating system understand what’s going on, virtual machine programs present these shared folders as network file shares. The guest operating system accesses a folder on your PC like it would a shared folder on a network.

VirtualBox

RELATED ARTICLE

The HTG Guide To Speeding Up Your Virtual Machines
Virtual machines are demanding beasts, providing virtual hardware and running multiple operating systems on your computer at once. Upgrading your… [Read Article]

VirtualBox’s Shared Folders feature works with both Windows and Linux guest operating systems. To use this it, you’ll need VirtualBox’s Guest Additions installed in the guest virtual machine. Click the Devices > Insert Guest Additions CD image option while a virtual machine is running and run the installer from the virtual disc to install it.
install-virtualbox-guest-additions
Next, click the Machine > Settings option in a virtual machine’s window and select Shared Folders. Here you can see any shared folders you’ve set up. There are two types of shared folders — Machine Folders are permanent folders that will be shared until you remove them, while Transient Folders are temporary and will be removed when the virtual machine restarts or shuts down.
virtualbox-shared-folders
Click the Add button or right-click in the list and select Add Shared Folder to add a new shared folder. The folder path is the location of the shared folder on your host operating system, while the name is how it will appear inside the guest operating system.
By default, the virtual machine has full read-write access to the shared folder. Enable the Read-only checkbox if you want the virtual machine to only be able to read files from the shared folder.
The Auto-mount checkbox makes the guest operating system attempt to automatically mount the folder when it boots. The Make Permanent checkbox makes the shared folder a Machine Folder — by default, it’s a transient folder.
add-shared-folder-to-virtualbox-virtual-machine
You should see the shared folders appear as network file shares if you’re using a Windows guest operating system. Open Windows Explorer or File Explorer, select Network, and look under the VBOXSRV computer.
access-virtualbox-shared-folders-in-windows-network
You can also mount these folders with the appropriate commands. Hover over the list of shared folders in the virtual machine’s settings window if you ever need to double-check the commands you’ll need.
Use the following command on Windows, replacing NAME with the name of the share:
net use x: \vboxsvrNAME
Use the following command on Linux, replacing NAME with the name of the share and /mnt/folder with the path to a folder. You’ll need to create this folder first if it doesn’t exist:
mount -t vboxsf NAME /mnt/folder
virtualbox-network-share-mount-commands

VMware

VMware’s Shared Folders work with both Windows and Linux operating systems, too. You’ll need VMware Tools installed in your virtual machine to use this feature. Select the option in your virtual machine’s menu to install VMware Tools or update your virtual machine’s VMware Tools to the latest version.
vmware-player-install-vmware-tools
Next, open your virtual machine’s settings window. For example, in VMware Player, click Player > Manage > Virtual Machine Settings. Click the Options tab, select Shared Folders, and enable the feature.
Add folders you want to share here. They’ll appear in the virtual machine with the name you provide. By default, the virtual machine will have full read-write access to the folder. Check the Read-only box in the wizard to prevent the virtual machine from writing to the folder.
add-shared-folders-to-virtualbox
The shared folders will then appear as a network file share in your Windows guest operating system. Look under the vmware-host computer.
access-shared-folder-in-vmware-windows-network
Check the “Map as a network drive in Windows guests” option to speed things up. Instead of digging through the network file shares, your shared folders will get their own drive letter and appear in the Computer window. This just uses the “map network drive” feature in Windows.
map-vmware-shared-folder-as-network-drive
On a Linux guest system, you should find VMware Shared Folders under /mnt/hgfs in the root directory.

If you have multiple virtual machines, you’ll need to set up file sharing separately for each one. Be careful when using shared folders — if your virtual machine becomes compromised, the malware could escape your virtual machine by infecting files in your shared folders.
Chris Hoffman is a technology writer and all-around computer geek. He’s as at home using the Linux terminal as he is digging into the Windows registry. Connect with him on Google+.
  • Published 05/31/14
GET ARTICLES BY EMAIL
Enter your email address to get our daily newsletter.
Disclaimer: Most of the pages on the internet include affiliate links, including some on this site.

Copyright © 2006-2016 How-To Geek, LLC  All Rights Reserved

Share this: