Question Status

Unanswered
Cory Bonallo asked a question on 27 Mar 2012 8:48 AM

I went digging around on the net to find examples of this and did find serveral that got me in the right direction.  But I still seem to be missing something.  I think what I'm doing wrong is assigning the fetchxml to the subgrid rather than the chart's view in the subgrid.  Can anyone tell me how to fix this?  Thanks for all your help!

Here is the error message, not very helpful...

 

Here is my code:

function UpdateSubGrid() {
 var accountSales = document.getElementById("SalesSummary");
 if (accountSales.readyState != "complete") {
  setTimeout('UpdateSubGrid()', 1000);
  return;
 }

 var accID = Xrm.Page.data.entity.getId();
alert(accID);

 var accountNum = Xrm.Page.getAttribute("jensen_accountnumber").getValue();

 var fetchXml = "<fetch version='1.0' output-format='xml-platform' mapping='logical' distinct='true'>";
  fetchXml += " <entity name='account'>";
  fetchXml +=  " <attribute name='jensen_yeartodatesales' />";
  fetchXml +=  " <attribute name='jensen_yeartodateplan' />";
  fetchXml +=  " <attribute name='jensen_lastyearsales' />";
  fetchXml +=  " <attribute name='name' />";
  fetchXml +=  " <filter type='and'>";
  fetchXml +=  " <condition attribute='statecode' operator='eq' value='0' />";
  fetchXml +=  " <condition attribute='accountnumber' operator='eq' value='";
  fetchXml +=  accountNum;
  fetchXml +=  "' />";
  fetchXml +=  " </filter>";
  fetchXml +=  " <order attribute='name' descending='false' />";
  fetchXml +=  " </entity></fetch>";
alert(fetchXml);

accountSales.control.setParameter("fetchXml", fetchXml);

accountSales.control.refresh();
}

Here is the Account form with the subgrid that has the chart in it, highlighted:

This chart us showing ALL accounts rather than being filter to the account I'm in.  The new fetchXml that I'm trying to assign it did not get set.

Reply
Mohammad Atif responded on 27 Mar 2012 11:03 AM

Hi Cory,

Are you getting this error message while navigating to the CRM Application? Like clicking on Customization>System settings> Entity>Clicking on new entity

Or while creating a new user In CRM 2011

Regards,

Mohammad

Reply
Cory Bonallo responded on 27 Mar 2012 1:12 PM

Neither.  I have added the above chart and custom control to the Accounts main form.  I get this when I open the main form in accounts.  The error is related to trying to assign the fetchXml to the subgrid on the Account form.

Reply
Mohammad Atif responded on 27 Mar 2012 1:33 PM

1      Go to Control Panel

2.     Look for Microsoft URL Rewrite Module 1.1 for IIS 7

3.     Please uninstall this

4.     Do IISRESET

5.     Re-install Microsoft URL Rewrite Module 1.1 for IIS 7

a.     Take your CRM Install Disk, Browse for UrlRewrite Folder.

6.     IISRESET

7.     Browse your CRM

Thanks,

Mohammadf

Reply
Cory Bonallo responded on 27 Mar 2012 2:18 PM

Hmm... Ok.  I will try this on our dev CRM server.  I am doing this on the CRM server, not the clinet?

Reply
Mohammad Atif responded on 27 Mar 2012 2:31 PM

Hi Cory,

Yes, this is only for the Server and not for the client. If you do not want to uninstall the URL Rewrite module you may try to repair it from the add and remove program.

Thanks,

Mohammad

Reply
Cory Bonallo responded on 27 Mar 2012 4:51 PM

Still getting error.  Do I have the right version of this file:

 

Microsoft URL Rewrite Module 1.1 for IIS 7

{7BB38DF8-E383-4145-8410-D167757B4B63}

10/26/2010

Reply
Cory Bonallo responded on 27 Mar 2012 4:52 PM

Oh, and I did unistall and reinstall.

Reply
Cory Bonallo responded on 28 Mar 2012 10:59 AM

I discovered what I had done wrong.  I had the name of the function incorrect.  I did not know it had to match the name of the function inside the liabrary.  Once I got that fixed the fetchXml did start working.  However, even though it is working, I get the following error:

 

Anyone seen this before?

Reply
Mohammad Atif responded on 28 Mar 2012 11:01 AM

What is the update rollup installed ?Do you have activity feeds installed and configured?

Thanks,

Mohammad

Reply
Cory Bonallo responded on 28 Mar 2012 12:02 PM

This is the like that is causing the error:

accountSales.control.refresh();

We have RU 6 installed and I don't know about activity feeds.  Does it come with a default installation?

Reply
Mohammad Atif responded on 28 Mar 2012 1:33 PM

No it doe's not comes with Default installation.

Are you getting this error message form the CRM 2011 Outlook cleint or you are getting this from the web client also.

If from web client. are you getting this error message form the CRM  2011 server?

Thanks,

Mohammad

Reply
Cory Bonallo responded on 28 Mar 2012 2:13 PM

I am getting this from the Outlook Client and the Web Browser IE8.  However, you dont get the pop-up message on the browser.  You can just see the error on page symbol.

Reply
Cory Bonallo responded on 30 Mar 2012 1:33 PM

Find anything out?  I have posted on two other sites and still no solution...  Thanks Mohammad for your time.

Reply