0

for example in a lookup relation,customer object is a parent,bike object was child, both have same amount__c field ,when we enter the amount__c value in customer obj automatically update the amount to Bike object amount__c field

plz help me out

  • 2
    The simplest approach is to make the relationship a master-detail once and include a roll-up summary field on parent called Amount__c that sums the Amount__c field on the bikes. Triggers are harder to get right. – Keith C Sep 16 '14 at 14:27
  • 2
    This is at least the 3rd question I've seen you post asking how to solve something using triggers. All can be solved without code. Take some time to go through the Force.com workbook to learn about built in features of the platform: developer.salesforce.com/page/Force.com_workbook – Daniel Hoechst Sep 16 '14 at 15:03
  • If you are only updating the amount on the parent and what the child to have the parent value, you can add a cross object formula on the child object to get the parent amount. – Jenny B Sep 16 '14 at 21:10
1

As per Keith's comment - try and make it a master-detail.

If you have to do it - try using something like this open source tool to help you if you are uncomfortable coding.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.