Use updateRow to update a parent model?

Javascript doesn’t like this:

model.updateRow(row, {Patient_Case__r.Estimated_Due_Date_by_U_S__c: null});


It’s expecting ‘:’ and getting ‘.’ after Patient_Case__r. What’s the best way around this? I’d rather not have to create a model on the Patient Case object.

Thanks!

Notes:

I attempted 

Patient_Case__r: {Estimated_Due_Date_by_U_S__c: null}

but this had no effect.

I also attempted putting quotes around the field:

'Patient_Case__r.Estimated_Due_Date_by_U_S__c': null. 

This created a “field” in the model’s data object called Patient_Case__r.Estimated_Due_Date_by_U_S__c with a value set to null, but it did not change the value of Estimated_Due_Date_by_U_S__c in the Patient_Care__r object in the model’s data.

Matt, are you trying to actually have this change affect the related Patient Case record in Salesforce? This is not possible using the above syntax — when you go to save, Skuid will strip out any “related object” updates that you pass in to it — i.e. if your Field name contains a “.” in it somewhere, Skuid will not perform this save. You will have to have a separate Model on the Patient Case and update that model separately, then save that Model as well.

Zach,

Yes, I want to change the parent record in SFDC without creating a model on the parent object.

It looks like I found a way to do it (although not an officially supported way):

var model = arguments[0].model, row = model.getFirstRow(),<br>$ = skuid.$;<br>row.Patient_Case__r.Estimated_Due_Date_by_U_S__c = null;