It appears that 7.x has changed the case of the condition attribute enclosevalueinquotes from all lower case to camel case (encloseValueInQuotes). This causes an error for code (dynamic model creation) written against 6.x that uses all lowercase.
After calling updateData the first time, the model contains an property “enclosevalueinquotes” and “encloseValueInQuotes”. When calling updateData a 2nd time on a model, a remoting exception occurs regarding duplicate field.
Steps to Reproduce:
- Create page using Sample XML below
- Preview page
- Check console window for error
Error:
Sample Page XML
<skuidpage unsavedchangeswarning="yes" personalizationmode="server" showsidebar="true" showheader="true"> <models/>
<components/>
<resources>
<labels/>
<javascript>
<jsitem location="inline" name="newInlineJS" cachelocation="false" url="">(function(skuid){
var $ = skuid.$;
var createAccountModel = function() {
var accountModel = new skuid.model.Model();
accountModel.objectName = 'Account';
accountModel.id = 'Account';
accountModel.recordsLimit = 1;
accountModel.fields = i
{ id: 'Id' }
, { id: 'Name' }
]
accountModel.conditions = t
{
type: 'fieldvalue'
, field: 'Name'
, operator: '='
, value: 'blahblah'
, state: 'on'
, inactive: false
, name: 'accountName'
, enclosevalueinquotes: true
}
]
accountModel.initialize().register();
return accountModel;
}
$(document.body).one('pageload',function(){
var accountModel = createAccountModel();
skuid.model.updateData(aaccountModel])
.then(function() {
skuid.model.updateData(aaccountModel]);
});
});
})(skuid);</jsitem>
</javascript>
<css/>
</resources>
<styles>
<styleitem type="background" bgtype="none"/>
</styles>
</skuidpage>