I’m trying to copy the row of a child model to a different parent.
Anyone see anything wrong with this code?
var $ = skuid.$,
mergeCase = skuid.$M('MergeCase'),
mergeData = mergeCase.getFirstRow(),
primaryPatient = skuid.$M('PrimaryPatient');
var copyValues = [];
$.each(mergeData, function(f,v){
if (f !== 'attributes' && f !== 'Id' && f !== 'Patient\_\_c') {
copyValues.push({field: f, value: skuid.utils.decodeHTML(v)});
}
});
primaryPatient.createRow({additionalConditions: copyValues});
I’m getting this error message (line 79 of my page corresponds to the createRow() line of the above.
Is there a better way to do this?