Showing posts with label Tools. Show all posts
Showing posts with label Tools. Show all posts

Monday, October 28, 2013

Microsoft Dynamics CRM 2013 Adding a custom button to the Home Grid

 

Today I received a call from a customer that had been upgraded to Microsoft Dynamics CRM 2013, and was looking for the custom buttons we created on MS Dynamics CRM 2011 and now with the upgrade they are not display or not showing for the Entity Home Grid.

Immediately went and  look for the buttons and realized the custom button  was not available anymore, the JavaScript web resource the button called was there and enabled, next on my plan was to add the buttons back.

In this case I when and look for a CRM 2013 Ribbon tool, and found a beta version for Ribbon Work Bench 2013, that help me to create the buttons I need for the customer

Develop1 – Ribbon Workbench for CRM 2013

Ribbon0

The only limitation is that by default the entity will only display 5 elements (buttons) on the navigation at any time, so depending on the need the button will need to move back to the initial of the list, in the other case it will end up on the “…” list items

Let me show you about this limitation or what I called the Quick 5.

Ribbon1

Not on the Quick 5 buttons

Ribbon2

 

Hope this will help you in the same way help me to understand the new CRM 2013 UI and Navigation.

 

Abe Saldana

This is my personal opinion and not represent my employer or Microsoft

CRM 2013 Custom Site Map section and Ribbon Button

 

Working on updating and upgrading solutions to the new UI for CRM 2013, we encounter that the customer and sometimes even us (Developers and Customizers) are lost in the new CRM 2013 navigation, and need to remember where we put the custom entities and how the development was assigned to the original sections (Sales, Service, Marketing, Settings). for that reason I used the Sitemap tool and created a section called “Custom Area” and added the custom entities to that section or tab.

These are some of the screen shots I got for the  demo version I created as a proof of concept

NAVIGATION1

then next I was able to add custom entities to the navigation tab

NAVIGATION2

when I created the Sitemap I was able to see the custom area as part of the entity definition and configuration, also I was able to assign the custom entity or other entities to the same custom area, like in the previous screen shoot I was able to assign the Account entity.

NAVIGATION3

 

Using the SiteMap tool (XRMToolBox by Tanguy92 )

The sitemap tool used to customize the navigation was a CRM 2011 version, so you can use the tool and make updates to  CRM 2013

 

NAVIGATION4

 

Our customer is now happier to find the custom entities and related information on a single location.

This will help is some cases, however having an option for the customer to continue be productive and not to be looking all over the navigation and try to remember the location that was on the previous version site map; at the end is better to have a happier customer than been annoyed by the upgrade.

 

Abe Saldana

This is my personal opinion and not represent my employer or Microsoft.

Friday, September 27, 2013

How to add a Subgrid Ribbon Context Button to Update a field using oData!

I got the request on one of my projects for Dynamics CRM 2011, to add a button for the subgrid context, that when the user selected one of more than one record the button will be enable and the button will update one of the status fields for the Event Attendance, not the most common thing for me, however I decided to tackle the request.

I used the following Tool Visual Ribbon Editor, and you will see screenshots for the button configuration.


























Created the Button and called "Attendance", the next step is to create the Actions and the Enable Rules















in the actions I created a JavaScript function with the name "processrecords" a lot of imagination on the function name. Added to the library EventAttendee_Ribbon.js  web resource file, and the most important part was the CRM Parameter


Cmd Parameters: SelectedControlSelectedItemIds (this will pass the parameters for the function and then assign the Grid Selected ID’s)






















Next the options for Enable the button when selecting 1 or more records from the subgrid.

Applies to: SelectedEntity
Maximum:
Minimun: 1

























Save and Publish the button configuration, update the web resources for the JavaScript

Testing the Button and selecting a couple of records


















Final Test Results and Validation.




















The following is the Javescript code I used to update the values for the record. the code was using oData and JQuery to update the selected records.

 in the same web resourse file I included the Jquery.js, also the SDZK.Rest.js and finally the code on the next image



Hope this help you in your projects.


Abe Saldana.