FetchXML HttpRequest object is constructed differently inside a webresource compared to outside. Anyone know why?

I'm wondering if anyone can shed any light on the below:
I have a html webresource which is hosted on an entity form. The resource is using Jscript to create and execute a fetchXML request which aggregates up some data from child records.
The HTML page when executed as a stand alone page performs perfectly - retrieving the data and summing up nicely. When I host the resource in the entity form though, it fails silently. No big blow up or anything, but it doesn't render the fetchxml results.
Analysis using the F12 IE tools shows me that when I create the fetchXML request object using
 var req = new XMLHttpRequest();
When rendering the html page stand-alone the req object is of type "DispHTMLXMLRequest", wheras when the html is executed from within the webresource on the entity form, the req object is of type "XMLHttpRequest".
The latter seems to be unable to parse the XML results, even though it is exactly the same XML response from the server. I get an "unspecified error" when the success callback function tries to render the responseXML. I've also tried to call
parse.XML(req.response) - this also gives an "unspecified error"
I've used fiddler to confirm that the fetchXML is executing successfully in both cases, and returning results. The responses from the crm webservices are identical.
The last thing that I've noticed is that if I use IE tools to make the browser run in IE8 document mode, then the page renders correctly both as a stand alone page and as an embedded web resource. (The req object is created as DispHTMLXMLHttpRequest rather
than an XMLHttpRequest)
Can anyone explain why the constructor of the req var acts differently when running in a webresource to what it does as a stand alone html page? Is there a way that I can explicitly control the behaviour of the constructor?
Additionally - can anyone explain why IE8 seems to work for the embedded webresource, wheras all IE versions above 8 fail?
I'll re-iterate - this is not an issue with the fetchXML itself - the request to CRM succeeds every time, and responds perfectly. It's an issue with how the Jscript XMLHttpRequest is constructed in different scenarios, and how that Jscript XMLHttpReqeust
object is able to parse the results.
Paul Dowman, CRM Developer

JJCrehn,
First of all, we do appreciate your efforts. Regardless of whether we agree with the conclusions drawn, it is extremely useful to know what's out there, especially if we need to convince management of the merits of one platform verses another.
Unfortunately, for future reference, reprinting an article like this in its entirely is usually a violation of copyright laws. You are much better off just printing a URL to the web site's copy of the article.
I am mentioning this now because I have the weirdest feeling that the Sun Forum moderators will eventually kill the thread and I wanted people to have an idea of why they might kill it.

Similar Messages

  • Hi - for any photo, info in mountain lion shows a different file size than Photoshop does. I've tested with CS3 and CS6 and get the same problem. Doesn't happen with CS3 and OSX10.4 or any previous versions of Photoshop and OSX. Anyone know why?

    Hi - for any photo, info in mountain lion shows a different file size than Photoshop does. I've tested with both CS3 and CS6 on 10.8.2 and get the same problem. This doesn't happen with CS3 and OSX10.4 or any previous versions of Photoshop and OSX. Anyone know why?

    this one is actually a really rare symptom of a flaky connection to the ipod on a Windows PC. there's more going on in terms of hardware on nanos and 5th gens than in the earlier models ... so if the connection is flaky to precisely the right/wrong degree, itunes will see the ipod, but misidentify it as an earlier version of ipod.
    tracking down the cause of the flakiness can be tricky ... as you already know ...
    just checking. have you tried connecting with a different (known-good) USB cable? does that seem to have any impact on the rate of occurence of the problem?

  • I blocked quite a few different phone numbers awhile ago but when I looked at the blocked numbers today it looks like the same number has been blocked multiple times.  Does anyone know why that is?

    I blocked a lot of different numbers awhile ago but when I checked the blocked numbers today it looked like the same numbers were blocked multiple times.  So for example if I blocked phone numbers 555-555-5555, 555-555-5556, and 555-555-5557 on different days it looks like only 555-555-5555 has been blocked 3 different times and I no longer see phone numbers 555-555-5556 or 555-555-5557.  Does anyone know why?

    Oh dear, one of those phantom disconnections. You know they are actually so common BT have a specialist department that deals with them. I think they are called Priority Back in Service, there is no actual phone number you can ring them on, you have to call 150 as normal and the customer service team are supposed to raise the issue with them to sort out.
    You could contact that Mods but they sometimes take 3 days to reply, especially with it being the weekend.

  • I have downloaded the tv shows Homeland and Dexter. They have ended up in different places. Dexter is where is "belongs" in my itunes library on my NAS drive. Homeland ended up on my hard drive in the itunes/music/tvshows directory. Anyone know why?

    Several months ago I bought and downloaded Homeland. Earlier this month I bought
    Dexter Season 7. They have ended up in different directories. My iTunes library is
    on a NAS drive and Dexter was stored there (where it belongs). For some reason,
    Homeland got saved to my Mac hard drive in the itunes/music/tvshows directory.
    This seems odd everything else I have downloaded, music, other tv shows, movies
    have been saved to the proper place. I haven't changed the path to my iTunes
    library in years.
    Now, iTunes has kept track of these two tv shows and I synced them both
    to my iPad. The only reason I know they are in different places
    is because my wife couldn't find them on the NAS drive.
    Mostly out of curiosity, I'd like to know why this happened and how to keep it from
    happening again.
    Oh, it's iTunes 11.0.3 running on a MacBook Pro with OS X 10.6.8.
    Thanks
    Bob

    I don't think it is easy to move part of a collection unless you don't care about the metadata such as date added, etc.  You can copy the files to the other drive, delete in iTunes the references to the copies still on your computer, then hold down the option key while dragging the files on the external to iTunes so it doesn't copy them back to your internal but just references them where they are.  You have to remember to do this each time.  Either that, or set preferences so iTunes does not automatically copy any file to your media folder when added but leaves them all where they land on your computer.  You can move them by hand around the computer, but not between drives.
    You could try Dougscript "Move Files To Folder" but I don't know if this enables iTunes to track items moved to a different drive.  iTunes doesn't really like using multiple drives.
    As for using Time Capsule, I have seen various takes on this.  I recall reading somebody saying it isn't a good idea to have a backup drive competing for dual purposes.  My take on it is, TC is a backup, period.  If you keep your movies on it and the TC drive dies, you lose your only copy of the movies.
    How often do you really watch these movies?  Yes, it is nice having them appear in iTunes, but unless you are watching them every day then it isn't a huge burden to have them on another drive.  Frankly, if I had iTunes movies I would probably make a whole different library for them and start from it with the external drive turned on when I was in a movie mood.

  • Does anyone know why the mixed signal graph stops allowing traces to be drag'ed and dropped between different plot areas?

    I have a mixed signal graph that allows me to drag and drop my traces between the plot areas,  then it stops allowing it.
    If I start with a new graph it allows it but eventually stops allowing it.
    I have 4 XY charts feeding the one mixed singal graph through a bundle function, then I run it once and drag my traces to the correct plot area
    and hope that it keeps working.
    Best Regards
    Tim C.
    1:30 Seconds ARRRGHHH!!!! I want my popcorn NOW! Isn't there anything faster than a microwave!

    Hi Tim,
    That sounds like some interesting behavior.  Can you reproduce what you were seeing, or have you continued to be able to drag the signals to other plots since you saved and reopened your program? 
    Jennifer R.
    National Instruments
    Applications Engineer

  • Icloud photos use different amount of memory on ipad and iphone. Anyone know why?

    i Recently set up photos library on icloud. I have the same number of pictures on both my ipad and iphone, yet the memory usage is nearly double on the iphone. i can't think of a reason for this. Does anyone have an explanation?

    So does that mean, that if I have more available memory on one of the devices, then the pictures will be stored at a higher resolution?
    I have both devices set to optimise the pictures, There are the same number of pictures on each device, yet on the iPad they use 150mb but on the iphone they use 300mb
    There is a little more space available on the iPhone, so maybe the resolution they are stored at, is varied according to space?

  • How can we assign sproxy generated objects to a different package?

    Hello Expert,
    We need to change the package assigment of sproxy generated DDIC objects. How can we assign sproxy generated objects to a different package?
    Regards,
    Thulasi

    Any idea?

  • Error in ME51N -  Account object functional area differs from asset master

    We are in the middle of going thru an upgrade -
    Funds & Functional Area were display fields in the old system but it was recetly changed to required fields in the Asset Master Record (AS01). Now when I try to create a Purchase Requisition for procuring the asset, I get this error - We are in the middle of going thru an upgrade -
    Funds & Functional Area were display fields in the old system but it was recetly changed to required fields in the Asset Master Record (AS01). Now when I try to create a Purchase Requisition for procuring the asset, I get this error - Account object functional area differs from that in asset master record. Any suggestions?. Any suggestions?

    The functional area what is comming is not the same in Asset accounting as you get from ME51N.
    What functional area you get from ME51N and what is the asset.
    Is the functinal area in the cost center not the same as you filled in the asset?

  • Error in ME51N - Account object functional area differs in asset master

    We are in the middle of going thru an upgrade -
    Funds & Functional Area were display fields in the old system but it was recetly changed to required fields in the Asset Master Record (AS01). Now when I try to create a Purchase Requisition for procuring the asset, I get this error - Account object functional area differs from that in asset master record. Any suggestions?

    hi
    please check the Asset Master for functional area.

  • I am writing a book and need to have the margins alternating left and right pages, so that there is sufficient margin for the binding. I have tried different inside and outside margins, the same inside and outside margins, facing pages, changing the maste

    I am writing a book and need to have the margins alternating left and right pages, so that there is sufficient margin for the binding. I have tried different inside and outside margins, the same inside and outside margins, facing pages, changing the master, and I cannot get the margins to alternate at print time. The larger margin is always on the left. Can anyone please help me on this, as I have spent hours and lots of ink.

    Set up as facing pages with a larger inside margin.

  • Using httprequest object

    I'm a struts frame work developer and I'm trying to populate combobox using httprequest object. The code seems working( I debugged it) don't populate the combo. My code is as follows.
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
    <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
    <%@ taglib uri="/WEB-INF/salIncrement.tld" prefix="salIncrement" %>
    <%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
    <%@ taglib uri="/WEB-INF/emplContext.tld" prefix="emplContext" %>
    <html:html>
    <HEAD>
    <%@ page
    language="java" pageEncoding="utf-8"
    contentType="text/html; charset=utf-8"
    errorPage="error.jsp"
    isErrorPage="false"
    %>
    <META http-equiv="Content-Type" content="text/html; charset=utf-8">
    <META name="GENERATOR" content="IBM WebSphere Studio">
    <META http-equiv="Content-Style-Type" content="text/css">
    <LINK href="theme/Master.css" rel="stylesheet" type="text/css">
    <TITLE>salaryIncrement.jsp</TITLE>
    <script language="JavaScript">
    function up(cd){
    var code=cd.value;
         var request = null;
         request =new ActiveXObject("Msxml2.XMLHTTP");
    request.open("GET","emplSalaryIncrement.jsp?structureCode="+code);          
         request.send(null);
    </script>
    </HEAD>
    <BODY>
    <html:javascript formName="salaryIncrementForm"/>
    <html:form action="/newSalaryIncrement.do" onsubmit=" return validateSalaryIncrementForm(this);">
    <TABLE width="100%">
         <TR>
         <TD class="formheader">
              <bean:message key="SalaryIncrement.Title"/>
         </TD>
         </TR>
    </TABLE>
    <TABLE>
    <TR>     
         <TH><bean:message key="SalaryIncrement.SalaryStructure" /> </TH>
         <TD width="50%">
    <select size='1' name='salaryStructure' style='width: 99%' style='font-size: 8pt;font-family: visual GeezUnicode'      onchange='up(this)'>
         <option value="001">one </option>
         <option value="002">two</option>
    </select>
              </TD>
    </TR>
    <TR>     
         <TH><bean:message key="SalaryIncrement.Grade" /> </TH>
         <TD>
         <%
         String salaryStructure="";
         salaryStructure=request.getParameter("structureCode");
              String language=locale.getLanguage();
              int count=0,i=0;
              HashMap param=new HashMap();
         if(!salaryStructure.equals(null)&&!salaryStructure.equals("")){
              param.put("Code",salaryStructure);
              param.put("locale",language);
              ResultSet rs= DataSourceFactory.instance().getDataSource().select("getServiceType",param);%>
              <select size='1' name='jobGrade' style='width: 99%' style='font-size: 8pt;font-family: visual Geez Unicode'>     
              <%while(rs.next()){%>
    <option value="<%=rs.getString("Code"));%>"><%=rs.getString("Description"));%> </option>
              <% }%>
         <%}else{%>
         <select size='1' name='jobGrade' style='width: 99%' style='font-size: 8pt;font-family: visual Geez Unicode'>     
    <option value=""></option>
         <%}%>
         </select>
    </TD>
    </TR>
    </TABLE>
    </html:form>
    </BODY>
    </html:html>

    You're in the wrong forum, try: http://forum.java.sun.com/forum.jspa?forumID=45

  • Messg-AAPO189 :Account object Cost Center differs from that in asset master

    At the time of Asset Acquisition in T-Code F-90 using Internal order, the system throws the following error:
    Message-AAPO189  :Account object Cost Center differs from that in asset master
    But in Asset Master data and Internal Order Master data's Cost Centers are same. 
    And we are not facing this problem for all Assets (only for few asset class only we are facing this error).
    Please guide on this.
    Note:
    We are not using Joint Venture Accounting.
    Regards
    JS
    Edited by: JS on Aug 12, 2009 7:14 PM

    Closed

  • To get all the objects that are used inside the class

    Hi All,
    All i wanna know is to get all the objects that are used inside the class.
    Ex :
    Class A{
    Emp e;
    public add(Dept d){
    e.deptid = d.deptId;
    in this class i have two objects, one Emp obj and another Dept object.
    I wanna get the details abt this class Emp and Dept by simply parsing the file and by not loading this class in JVM.
    Could any pls hel me out.??
    thx.

    I wanna get the details abt this class Emp and Dept
    by simply parsing the file and by not loading this
    class in JVM.Your problem statement is vague and the constraint is IMO hypothetical.

  • Accessing an object from a different server

    Hi,
    I am making a program that will access an object from a different server.
    I have a program that when I run calls a jsp page running on Server A which in turn should request an object A from Server B.
    I am relatively new to Java and jsp. What would my best course of action be.
    Thanks in advance,
    Brian

    Or RMI?OK, sounds good, I will look up some RMi on the site.
    Thanks, will prob have more questions for you later.

  • Assigning the object to a Different transport request number.

    Hi all,
    I have assigned a object to a different transport request  number and i now i want to assign it to a new one..can any one tell me some procedure to change it.
    Tnx,
    Joe.

    Hi Joe
    In SE09 tcode click on display icon and enter the transport number in which the object was already assigned and click on display.
    Now delete the object from the task of the main request number.
    Now its ready to lock in some other transport request. Just goto the workbench object, try to save or activate, it will automatically ask for transport request afresh. You can now assign the request at this step.
    Rgds,
    Sripal

Maybe you are looking for

  • Volume control not working after I plug in speakers or headphones

    When I turn on my 13 inch with Mac OS X version 10.6.8 or if I restart it, my volume works perfectly. However, whenever I plug in earphones or speakers the volume will be 'stuck' on the loudest it can go. When I use the volume controls on my keyboard

  • Applet in .jsp

              I have always a ClassNotFoundException instead of the applet wanted,           what's the path exactly I have to put in the codebase           for Weblogic to find the .class of the applet,           Have I to put something also in the CLAS

  • Startup Questions Issues (Again)

    I've read numerous discussions of startup issues but haven't been able to solve our problem. Maybe someone might have a suggestion. Thanks for any help you might be able to offer. We have a white 12" iBook 700 MHZ running OS 10.3 that startups very e

  • Ipod nano...getting photos

    i am trying to figure out how to put photos on my ipod nano...will some1 help

  • Error, no pages found

    I have a Canon MX922 printer and every time I try to print something it says, "Error, no pages found."  Any ideas on how to fix this?