You need to sign in to do that
Don't have an account?

Update List
Hello, i have a small problem...
I want to update a list like this, but it doesnt work.
List<obj__c> list = [SELECT Value__c,Masterobj__r.otherValue__c FROM obj__c ];
for(obj__c i : list){
i.Value__c = true;
i.Master__r.otherValue__c = true;
}
update list;
Value__c becomes true but not Master__r.otherValue__c. Where is my mistake?
Updating parent records like that isn't supported. You would need to split the Master__r record into it's own SObject and update it separately.