How to copy the filed value in one Model into another model field

  • 1
  • Question
  • Updated 4 years ago
  • Answered
  • (Edited)
I have two Objects like Quote(Parent) and Order(Child) .
where as in quote I have one Boolean field like wise in Order have Boolean field.
What my requirement is when Click the button if the Boolean field is true in quote same thing need to check in Order Boolean field. can any one help me to resolve this. 
Photo of Gurunath

Gurunath

  • 130 Points 100 badge 2x thumb

Posted 4 years ago

  • 1
Photo of Rob Hatch

Rob Hatch, Official Rep

  • 44,006 Points 20k badge 2x thumb
You need to look into the action framework. 

Your button needs to be of type "Run Multiple Actions" 
Then one of those actions needs to be "Update field on row"  -- where you choose a model build on the child object and update particular rows.  

Note:  your button will need to be on a skuid component that is in the context of the Parent model.  IF it is on a page title component - make sure the model context is set to the parent object.  IF it is a row action on a table,  you should be good. 

If you are comfortable with the booleans always being in synch - this will work.   If your requirements specify that If Parent = False child CAN = True you will have to create a more complicated If - Then statement,  which would need to happen in a custom snippet. 

Cheers.