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.





Thursday, September 26, 2013

Dynamics CRM 2013 Search for available content!

Looking for more thing related to the new Microsoft Dynamics CRM 2013 release and what new documentation I can find, had to make a search with the following results.

Check the results:

Dynamics CRM 2013 Search results

You will find documentation for:

  • Microsoft Dynamics CRM 2013 Implementation Guide
  • Microsoft Dynamics CRM 2013 performance counters
  • Connectivity and Firewall Port Requirements for Microsoft Dynamics CRM 2013
  • Using multi-tenancy in Microsoft Dynamics CRM 2013 to address challenges in enterprise business environments
  • Microsoft Dynamics CRM 2013 Software Development Kit (SDK)
  • Microsoft Dynamics CRM 2013 Custom Code Validation Tool


Abe Saldana