Thursday, July 22, 2010

Update to the Javascript Grid Editor documentation.

The "Advanced Scenarios" section of the Javascript Grid Editor's documentation has been updated with a new write-up on how to dynamically specify configuration parameters for related views.  This will hopefully address the issue of how to use the JGE in associated or embedded views, effectively.

This isn't a code update, as I'm still working on the next update that will give the JGE the ability to work with Money fields, and special "child entities" like the Quote/Order/Invoice Product.


  1. David beginner question for you, where do I put the finalized code generated from steps 1 & 2?

  2. Step 5.9 has the answer for you.

  3. Great tool you created here. Very helpful. Just want to point one little bug. It didn't have provision for "Money" type field, but then I was able to add it along the other field types.

  4. Hi Dave,
    any update on 'money' type field and 'child entity' such as OrderProducts?

  5. Leon, at this time I've been working very slowly on the developments that would allow this. It's the last "stage" of the code for me before I try to translate it into CRM 2011. All of the work, however, is occurring at home when I actually have contiguous time to focus on it. Expect to see something ironed out by the end of the year.

  6. Hey Dave, any joy with getting the grid editor to work in CRM 2011? Gotta love that holday break coding!

  7. Al, I appreciate your interest in the JGE project, but must unfortunately report that the holiday season did not offer me any reprieve to invest time into coding. Additionally, some major changes in our family have further limited my renewed efforts to finalize the JGE for CRM 4 before moving onto CRM 2011.

  8. I would like a clarification on one of caveats noted in
    "otherwise executing customized javascript that has been placed into the form for the entity it targets".

    I want to be able roll-up a amount, located on the JGE records, onto the regarding object's corresponding 'total amount'. Do I have access to the post update event (post Save All button event) from the JGE in order to update my rolled-up total amount? Or, do I have to implement a server-side plug-in that will take care of this calculation?

    To recap:

    1.Incident entity (the regarding object) contains "total rejected weight".
    2.Custom entity ("Paper Roll") - the JGE records contains "rejected weight"
    3.From JGE, user selects 2 of 10 "Paper Roll" records, then clicks 'Edit Mode'.
    4.After modifying 'Paper Roll' rejected weight on the 2 of 10 records, click 'Save All'.
    5.Can I update my 'incident total rejected weight' using javascript? If so, which event? If not, do I have to rely on a server-side plugin?


  9. Mark,

    Since you addressed this question here, rather than offline, I'll answer it here.

    Plugin operation will not be affected by using the JGE. All "post-update" registered Plugin code should fire properly. If you want to drive a recalculation on a parenting form, then I suppose the best way would be to hook into the grid's refresh. The grid is refreshed whenever the JGE leaves edit/add modes; this means either a Save, or a Cancel. There is no differentiation between them, and there are no other "events" into which I could conceive hooking.

    If it were me, I wouldn't be too concerned about the possibility of recalculating on cancellation of edits, since only writing a value to the "Total Rejected Weight" that is already there won't trigger the "isDirty" property, and therefore shouldn't prompt the user to save changes. I'd look for the grid element within the Iframe from the parent form (might be a lot of DOM traversal), and hook a script into that refresh event that does the following:

    1.) Queries child "Paper Roll" records (you can use my Javascript Library scripts for this; don't try to extract the values from the grid... it's messy, and a lot more trouble than its worth); and then,
    2.) Sum the retrieved "rejected weight" values into the "total rejected weight" field.


Unrelated comments to posts may be summarily disposed at the author's discretion.