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

master detail trigger
1.customer__c(master obj) and address__c(detail obj).
address__c has has 2 checkbox field Nagpur__c and Pune__c and customer__c has TextField Hometown__c
if Nagpur__c is checked, Hometown__c = 'nagpur';
if Pune__c is checked, Hometown__c = 'pune';
2. is it true, that master-detail relation trigger like above wont require query ?
address__c has has 2 checkbox field Nagpur__c and Pune__c and customer__c has TextField Hometown__c
if Nagpur__c is checked, Hometown__c = 'nagpur';
if Pune__c is checked, Hometown__c = 'pune';
2. is it true, that master-detail relation trigger like above wont require query ?
It is true that this does not require query. I don't know your exact API names of the objects and relation field but anyway, here is a code sample: Even if the above will probably fulfill you business need. It might be worth checking that you are not performing unnecessary updates by checking if in after update, the address__c.Nagpur__c or address__c.Pune__c field values have actually changed.
Regards,
Mkr
All Answers
It is true that this does not require query. I don't know your exact API names of the objects and relation field but anyway, here is a code sample: Even if the above will probably fulfill you business need. It might be worth checking that you are not performing unnecessary updates by checking if in after update, the address__c.Nagpur__c or address__c.Pune__c field values have actually changed.
Regards,
Mkr