In this blog, I will first demo what the grid looks like in CRM 2013. Afterwards, I will walk through the main block of code.
The following screen shots demonstrate the editable grid of opportunity products inside of the opportunity.
The above demonstrates:
- Editing existing data, including lookup data
- Adding a new record
- Deleting an existing record
- The introduction of the custom option set field, ‘projected schedule’ (new to this post)
- Click ‘Add Opportunity’
- The standard lookup appears; select a product and click ‘Add’
3. Choose a ‘projected schedule’
4. Click ‘Save’
5. As a proof of concept, the code takes the count of opportunity products, and updates the parent ‘estimated budget’ field. This demonstrates updating the parent opportunity.
The following code is reference implementation that you can adapt to your needs.
The following web resources make up this solution:
Knockout.js (version 2.2)
The below html web resource.
In future posts:
- Resolving the known issue with IE (yes, IE only – sigh)
- Object Expected with JsProvider.ashx
- How to integrate this code in CRM
- Paging through the grid