I'm using a row action on a table to create a new row whilst populating its fields with data from the original row. This is working fine except for using a formula field on the original row to populate a field on the new row.
I've tried re-querying the model before updating but that hasn't fixed it - the field comes up blank.
Any ideas?
Cheers!
Louis
-
5,144 Points
- fabaroonie
Posted 4 years ago
mB Pat Vachon, Champion
-
42,926 Points
-
5,144 Points
mB Pat Vachon, Champion
-
42,926 Points
Is the formula field visible to you? ie. field level security
-
5,144 Points
What I'm trying to do is take the original row, click a row action which drops down a drawer which allows you to enter a number. Click a button on the drawer which then saves that row and creates two new rows: one which has a 'Quantity' field populated using the number entered in the drawer, another which has the same 'Quantity' field populated using a formula which references the number entered in the drawer.
It's this second row that's not populating.
mB Pat Vachon, Champion
-
42,926 Points
mB Pat Vachon, Champion
-
42,926 Points
-
5,144 Points
mB Pat Vachon, Champion
-
42,926 Points
I ask because the moment you make a new row in that model the context merge fields change to that row.
So, prior to making rows, save the row and pull that original row into its own model and create the 2 new rows from it. Ie. {{$Model.modelname.data.0.fieldnames}}
-
5,144 Points
-
5,144 Points
mB Pat Vachon, Champion
-
42,926 Points
Set max records to 1.
Create condition of Id = "" Filderable Default Off
Add fields as necessary.
Actions to add before creating two new records.

-
5,144 Points
mB Pat Vachon, Champion
-
42,926 Points
Display that new model and row on the page to ensure that you can indeed see the data. Make sure to use nothing but {{$Model.modelname.etc...}}
-
5,144 Points
Thanks for your patience Pat - you're a stalwart and a trooper. If I could, I'd buy you beer.
Cheers!
Rob Hatch, Official Rep
-
44,168 Points
mB Pat Vachon, Champion
-
42,926 Points
You didn't say "We should buy Pat a beer"
Really should say "We should buy Pat a lifetime supply of Stronbow Cider"
Peter Bender, Champion
-
6,276 Points
To use a row action to create a new row/record and default/populate a field with data from the original/parent row/record, the original/parent model needs to contain the field that you are referencing. In other words, the new/child model does NOT need to contain parent__r.source_field__c, but the parent model DOES need to contain source_field__c. The new/child model does need to contain the target field into which the default data is being populated, of course.
Rob Hatch, Official Rep
-
44,168 Points
(Nice to see you in these parts again. We've missed you)
-
1,202 Points