cortezaproject / corteza

Low-code platform
https://cortezaproject.org
Apache License 2.0
1.46k stars 340 forks source link

Failure to Link Child Record to Parent Record When Adding a New Record #1758

Open KoamSK opened 2 months ago

KoamSK commented 2 months ago

I can't get a child record to be linked to parent record when adding a new record. The old modules and pages works perfectly. Version : 2023.9.5

Steps to Reproduce:

  1. Create a parent module named "a1" with a field named "parentName" of type string.
  2. Create a child module named "a2" with fields "childName" (string) and "parentID" (record selector) referencing module "a1".
  3. Create a record page for the module "a1" and add a record list block for the child module "a2" with a prefilter condition: "parentID = ${recordID}".
  4. Create a record page named "a2".

Expected Behavior: When adding a new record within a record of module "a1" by clicking "+Add" in the record list block for module "a2", the new record in module "a2" should automatically inherit the parentID field value equal to the parent's record.

Actual Behavior: Upon adding a new record in module "a2" from within a record of module "a1", the parentID field in the new child record remains empty, failing to establish the expected link to the parent record.

Additional Information: In the documentation, there is no clear steps talking about linking parent modules to child modules. I used keywords like "linking" "parent", or "child" but I didn't succeed.

a1 a2

katrinDY commented 2 months ago

This is an edge case that will be addressed in 2024.3.x. For now to avoid this, I would recommend creating a record page and then a record list page for module a1, doing the same for a2, and after this adding page blocks to the desired pages. I would delete the currently broken pages and follow the steps in the previous sentence.

katrinDY commented 2 months ago

Reproduction steps

Image

Notes

2 issues

github-actions[bot] commented 2 weeks ago

Stale issue message