Skip to main content
zacharyb8201
December 10, 2025
Solved

How to default a value in a create new row record action

  • December 10, 2025
  • 3 replies
  • 0 views

I am trying to use a create new record action to insert a new record into my table and based on the grid I am showing to the user they only can see records associate to an related record. I would like to be able to pass in the primary key for that parent record into the record action so I can default that field to use that value and not allow the user to associate to a different parent on accident. It is possible that there is not data in the grid but I would still know the primary key of the parent record to pass in.

Best answer by stefanhelzle0001

The trick is, to make that "Create Child Item" action not a record list action of the child record, but a related action of the parent record. Then you know the parent.

3 replies

shubhama926776
December 11, 2025

In the child Record Action interface, simply reference ri!parentFieldName (where parentFieldName is the relationship field) and set value: ri!parentFieldName, editable: false().

stefanhelzle0001
December 11, 2025

The trick is, to make that "Create Child Item" action not a record list action of the child record, but a related action of the parent record. Then you know the parent.

zacharyb8201
December 11, 2025

This was the solution! Thank you Stefan!