Dave Berry wrote an excellent customization for CRM 4.0 which provided the ability to mass update child records, directly from the related parent’s form. Unfortunately, the CRM 2011 architecture prevents this customization from being adopted. By now, there exist quite a few commercial solutions for grid editing.
http://pinpoint.microsoft.com/en-US/applications/add-edit-grid-for-crm-2011-and-crm-online-12884923430 http://pinpoint.microsoft.com/en-US/applications/editable-grid-add-on-for-crm-2011-and-crm-online-12884921672 http://www.c360.com/RecordEditor.aspx http://www.axonom.com/crm_solutions/powertrak/articles/editablegrids.html
I’ve been looking for a way to build a solution instead of buy. I came across this fantastic blog post, which suggests using knockout JS as the data-binding tool. There is a great tutorial and lots of examples to get started.
The following is an example of an implementation of an editable grid for CRM 2011. I show two examples of editing opportunity products from within the parent opportunity which are:
- How all changes to opportunity product are saved in a single operation
- How only one opportunity product is saved back to the server
I demonstrate the following features which allow:
- Editing existing data, including lookup data
- Adding a new record
- Deleting an existing record
The first editable grid illustrated above, implements the ‘multi-save’ design. In this case, all data is editable all the time. The second editable grid demonstrates using a single-record approach to editing records.
Referring to the single-edit approach, clicking on the ‘Edit’ link enables that record for edit. In this approach, the user must click ‘Apply’ in order to successful save the data. The record remains in edit mode until the user clicks ‘Apply’ or ‘Cancel.
Click ‘Apply’ results in a pop-up confirmation of the success. Naturally, the pop-up can be removed.
In the multi-save demonstration, note that both quantities have been updated. Click ‘Save’ to send the updates back to the server.
A confirmation pop-up reports the success of both records.
Click ‘Add Opportunity Product’ to add a new record.
Adding a record requires that certain required fields, namely the product, are selected. Therefore, the standard product lookup is presented.
Upon selecting a product, and clicking ‘Ok’, the record is successfully created. Notice that quantity and UOM are defaulted.
Removing a record is accomplished by clicking ‘Delete’ link next to the record.
Notice the record has been removed.
In the next blog post, I will walk through the code and how to integrate this code in CRM.
Some features I plan on demonstrating in a future blog are:
Editing ‘OptionSet’ fields
Paging through the grid