locked
CRM 2016 On Premise - Error on the on-load when creating a new record of a custom entity RRS feed

  • Question

  • hello,

    I have code on the on_load function for a form in 2016 on premise environment (sandbox) that was upgraded from 2011 on premise.  The existing script functions fine in 2011 and nothing in this area of code was flagged as blocking for the upgrade by the code validation checkers.

    When attempting to create a new record for this particular custom entity (form type = 1) error is presented on screen  - Message from webpage  {"Message". The request is invalid."}

    Debugging thru the form load nothing in the script appears to fail. It passes through the entire on-load code without errors.  When it has reached the end of this block of code debugging takes me to the ClientAPIWrapper.aspx and specifically to the following action within that code  -  perfMetric.stop();

    This appears to be part of the following function -  functionRunHandlerInternal(method, parameters, executionContext, executeIfAvailableOnly)

    I'm not clear on what is happening or causing this. Wondering if this is some type of performance/length of timing issue in loading the form.  I tried setting the system to use legacy form loading but that did not help.

    The on load event does reference a couple of other libraries for retrieving certain data or utility work but they all appear to work fine.  I did try to take some of the code from those libraries and incorporate it on the main form but that also did not help.

    Have also removed all code from behind the on-load event and error still occurs only when creating a new record. Loading an existing record does not error with or without the on-load code.

    Any suggestions appreciated.

    Thanks


    Rob


    • Edited by rdt1234 Tuesday, March 29, 2016 5:45 PM
    Tuesday, March 29, 2016 3:38 PM

All replies

  • Hi Rob,

    Try pasting your code here so people can take a look. The custom code validation tool doesn't identify 100% of the code issues and pretty much concentrates on deprecated / unsupported syntax and endpoint references.

    Rob


    MCTS. GAP Consulting Ltd. Microsoft Community Contributor Award 2011 & 2013

    Thursday, March 31, 2016 7:58 AM
    Answerer