I have a table of junction objects (ConsultationMedRec__c). Each is related to a different MedRec (MedRec__c). When I update the Order_Hidden__c field on the Consultation MedRec, I want the Order_Temp__c field on the related MedRec to be updated.
I’ve tried a couple of different Javascript snippets, but none seem to be working. I feel like I’m missing something - this seems like it should be pretty easy to do. Here’s what I’m working with now:
var params = arguments[0]; var $ = skuid.$;
var models = skuid.model.map();
var consultationmedrecs = models.ConsultationMedRecs;
var rowsToUpdate = {};
$.each(consultationmedrecs.data, function(){
rowsToUpdate[this.MedRec__c] = { Order_Temp__c: this.Order_Hidden__c };
});
consultationmedrecs.updateRows( rowsToUpdate );
Question
Update Parent Records for Each Child Record in Table
This topic has been closed for replies.
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.