Following Barry’s instructions, I’ve isolated the problematic model to the following. The model will initialize and register, but when I call .load(), I get the VF remoting error.
buildNextAppointmentModel = function(){ var modelNA = new skuid.model.Model();<br>modelNA.objectName = 'Interaction__c';<br>modelNA.id = 'ProgressNoteNA';<br>modelNA.fields = [<br>{id: 'Id'},<br>{id: 'Patient_Case__c'},<br>{id: 'Patient_Case__r.Name'},<br>{id: 'Timeless_Date__c'}<br>];<br>modelNA.conditions = [<br>{<br>type: 'modelmerge',<br>field: 'Patient_Case__c',<br>operator: '=',<br>model: 'ProgressNotePatientCase',<br>mergeField: 'Id',<br>noValueBehavior: 'noquery',<br>encloseValueInQuotes: true<br>},<br>{<br>type: 'fieldvalue',<br>field: 'Interacion_Category__c',<br>operator: '=',<br>value: 'Appointment',<br>encloseValueInQuotes: true<br>},<br>{<br>type: 'fieldvalue',<br>field: 'Status__c',<br>operator: '=',<br>value: 'Scheduled',<br>encloseValueInQuotes: true<br>},<br>{<br>type: 'fieldvalue',<br>field: 'Date__c',<br>operator: 'gte',<br>value: 'TOMORROW',<br>encloseValueInQuotes: false<br>}<br>];
When that is the only model I’m loading, here’s the ‘data’ portion of the error:
[ <a target="_blank" rel="nofollow"></a> <br> { <a target="_blank" rel="nofollow"></a> <br> "id":"ProgressNoteNA",<br> "preventUnloadIfUnsavedChanges":true,<br> "isProcessing":1,<br> "calloutIterator":1,<br> "lastSuccessfulCallout":0,<br> "objectName":"Interaction__c",<br> "isAggregate":false,<br> "isInitialized":true,<br> "fields":[ <a target="_blank" rel="nofollow"></a> <br> { <a target="_blank" rel="nofollow"></a> <br> "id":"Id"<br> },<br> { <a target="_blank" rel="nofollow"></a> <br> "id":"Patient_Case__c"<br> },<br> { <a target="_blank" rel="nofollow"></a> <br> "id":"Patient_Case__r.Name"<br> },<br> { <a target="_blank" rel="nofollow"></a> <br> "id":"Timeless_Date__c"<br> }<br> ],<br> "conditions":[ <a target="_blank" rel="nofollow"></a> <br> { <a target="_blank" rel="nofollow"></a> <br> "type":"modelmerge",<br> "field":"Patient_Case__c",<br> "operator":"=",<br> "model":"ProgressNotePatientCase",<br> "mergeField":"Id",<br> "noValueBehavior":"noquery",<br> "encloseValueInQuotes":true<br> },<br> { <a target="_blank" rel="nofollow"></a> <br> "type":"fieldvalue",<br> "field":"Interacion_Category__c",<br> "operator":"=",<br> "value":"Appointment",<br> "encloseValueInQuotes":true<br> },<br> { <a target="_blank" rel="nofollow"></a> <br> "type":"fieldvalue",<br> "field":"Status__c",<br> "operator":"=",<br> "value":"Scheduled",<br> "encloseValueInQuotes":true<br> },<br> { <a target="_blank" rel="nofollow"></a> <br> "type":"fieldvalue",<br> "field":"Date__c",<br> "operator":"gte",<br> "value":"TOMORROW",<br> "encloseValueInQuotes":false<br> }<br> ]<br> }<br>]