« Configuring Microsoft CRM Auto-Updates Directly from Microsoft | Main | Customer Effective Earns Exclusive Appointment to the Microsoft Dynamics Inner Circle and President’s Club »

August 08, 2009

TrackBack

TrackBack URL for this entry:
http://www.typepad.com/services/trackback/6a00e54fb34b6f88330120a4d5768f970b

Listed below are links to weblogs that reference Fun with the CRM Grid Object:

Comments

Ed

Hi Will,

Thanks for this post!

I've been looking for a way to access grid values for a week and I stumbled upon your post - it was just what I was looking!

Note: For some reason, using 'nameCell.childNodes[0].title' didn't always return a value, but changing to 'nameCell.childNodes[0].innerText' seemed to work for me.

Regards

jodi.cannon@mhctruck.com

Will,

Thanks very much for the post. It explains a lot about working with the row. But, I'm still a little confused. I need to pass the guid of the entity of the selected row to reporting services. My embedded grid is in an iframe. So, I have gotten this far:

var frameDoc = document.getElementById("IFRAME_Saw").contentWindow.document;
var a = frameDoc.all['crmGrid'].InnerGrid.SelectedRecords;
var selectedItems = new Array(a.length);
for (var i=0; i < a.length; i++)
{
selectedItems[i] = a[i][0];
alert("guid view" + a[i][0]);
alert("object type " + a[i][1]);
}

But, this guid is not the guid of the entity that I need for my SSRS query. How can I get the guid that will pull the entity?

thanks
jodi

Rob

Hi,

I am having a problem where the the view is showing properly in the IFRAME and the following work fine

var frameDoc = document.getElementById(IFRAME_TEST).contentWindow.document;
var a = frameDoc.all['crmGrid']

The problem I am having is that

var a = frameDoc.all['crmGrid'].InnerGrid is returning as undefined

I have tried this with both 1:N and N:N related entities with no difference. Anyone able to help me with this

Thanks very much
Rob

Adezeregap

I've attached a function to trigger when you click on a row, using the following statement:
framdeDoc.all['crmGrid'].InnerGrid.attachEvent("onselectionchange", gridclickfunction);

so that we can handle the selected records with that function.

However, when I sort the view, or change pages, the click function stops working (maybe it is reset somehow). Any ideas how to solve this?

Thanks

Alejandro

Mizuki

Alejandro: whole crmGrid HTML structure - including bound event actions etc. - is replaced during sorting/paging AJAX postback, you have to reinitialize all your custom scripts in client pageLoad /or Sys.Application.add_load()/

Verify your Comment

Previewing your Comment

This is only a preview. Your comment has not yet been posted.

Working...
Your comment could not be posted. Error type:
Your comment has been saved. Comments are moderated and will not appear until approved by the author. Post another comment

The letters and numbers you entered did not match the image. Please try again.

As a final step before posting your comment, enter the letters and numbers you see in the image below. This prevents automated programs from posting comments.

Having trouble reading this image? View an alternate.

Working...

Post a comment

Comments are moderated, and will not appear until the author has approved them.

Search The Blog

  • Search the Blog
     

    WWW
    this blog

Twitter Updates

    follow me on Twitter