locked
Is there something wrong with 2013 Opportunities or Form Merging? RRS feed

  • Question

  • My Opportunity has many forms and switches between them according to a setting on the record; this is done by jscript for the onLoad events.  I kept getting page errors (see my posting  http://social.microsoft.com/Forums/en-US/fe6ff87d-72f7-4d64-8b35-d15cb52bdb00/errors-have-me-thinking-about-formnavigate-behavior?forum=crmdevelopment .)

    The other thing that comes to mind is that two of these forms are merges of 2013 form with 2011 forms -- Opportunity merged with custom form C and Opportunity with custom form M.

    I finally got so frustrated that I removed ALL the onLoad events -- the same one on each of the several forms.

    THE THING STILL FIRES!  But only on the merged forms.  I believe the JavaScript is sound.  I've not only read through it, but also opened it in Visual Studio where it reports no syntax errors.  I'm theorizing that it somehow has kept the onload for both sources and only let's me remove it from one.

    You might also want to look at https://community.dynamics.com/crm/f/117/p/115948/252827.aspx#252827 .  It covers the same issue I'm seeing with Opportunity as witnessed by others.  Though no one there has mentioned the latent script running phenomena.  I tried the remedy of browsing InPrivate and it indeed does cure the page errors.  So, the answer to my question may be yes on both counts -- something wrong with Opportunities AND Merged Forms.

    Friday, February 7, 2014 3:47 PM

Answers

  • Turns out the page errors are the result of timing issues.  I changed the straight call to

    setTimeout( function () { rightform.navigate(); }, 1500);


    and all is well.  However, there is an issue with Merging Forms.  I tested another combination of two forms both having the onLoad event set.  The resulting form continues to execute the onLoad function after it is removed from the event.
    • Marked as answer by mardukes Saturday, February 8, 2014 7:22 PM
    • Edited by mardukes Saturday, February 8, 2014 7:27 PM
    Saturday, February 8, 2014 7:22 PM

All replies

  • CORRECTION

    I thought the InPrivate browsing was curing the page errors.  It does not.  Seems my alert()s in the JavaScript was the "remedy".  Once I removed them and tried again, the page errors returned.

    • wrong behavior of merged forms still at issue
    • could page errors be some sort of timing issue with the parallel loading rather than Oppty problem?
    • ...and if so, why isn't it intermittent and still there when the form closes? (<Message>Unable to get property 'length' of undefined or null reference</Message>)
    Friday, February 7, 2014 4:18 PM
  • Turns out the page errors are the result of timing issues.  I changed the straight call to

    setTimeout( function () { rightform.navigate(); }, 1500);


    and all is well.  However, there is an issue with Merging Forms.  I tested another combination of two forms both having the onLoad event set.  The resulting form continues to execute the onLoad function after it is removed from the event.
    • Marked as answer by mardukes Saturday, February 8, 2014 7:22 PM
    • Edited by mardukes Saturday, February 8, 2014 7:27 PM
    Saturday, February 8, 2014 7:22 PM