Passing data from one model to another

Would really appreciate some help with this. I’m working with 2 models and need to update a field on the primary model itself as well as pass a value to another model.I’m using some action framework but it’s not working (i’m sure it’s user error)

Technical Requirement
Model 1 (Customer_Number_master) [this is the child object]
Model 2 (Acct) [This is the parent object]

Desired Behavior
When a row in Model 1 is update and saved, I need 2 events to happen:

  1. On Model 1-Update a field with a value from another field
  2. On Model 2- Update a field with a value from Model 1

Below is a screenshot of what I have.

Thanks in advance.


What field are you trying to update? In your post you are trying to update the reference field (Account_Name__c) with the name value from the same lookup (the same Account)?



I was actually working on something like this earlier this week. I usually find its easier for me to figure things out by reverse engineering pages so if you want to take a look at the XML just let me know.

Basically it creates the opportunity, then passes the newly created opportunity’s Account ID over to the Potential Contact’s ID. When that condition is updated, the model will only display contacts from within that company so that user can link a key contact to their Opportunity. This may not be the exact use case you’re referring to; however, I was able to figure out my issue by taking the advice from these threads.

Now for my case i was only updating a model with a single row, so it was easy to control all variables. If you’re intending for this to work with model that has multiple rows that may prove more troublesome.