How to initialize?

Jan 7, 2015 at 12:22 AM
Using the sample code, I'm calling a fetch to populate a dropdown. When the CrmFetchKit.Fetch executes, the code does not continue, and the error in the console states:
"Uncaught Error: Context is not available."

Is there something I need to do in order to initialize the component?
Code:
    var fetchxml = ['<fetch distinct="true" mapping="logical"><entity name="account"><attribute name="new_xxxx" /><order attribute="new_xxxx" /></entity></fetch>'].join('');
    CrmFetchKit.Fetch(fetchxml).then(function (results) {
        /* success handler */
Coordinator
Jan 9, 2015 at 12:41 PM
Edited Jan 9, 2015 at 12:42 PM
No, an initialization is not required.

What version are you using and on which CRM version (2011, 2013, 2015) are you executing the code?

Are you sure the code is executed after the onload event of the form?

Daniel