Describe the bug
When creating an entity from a context app, the FK property value is set to 0, not to the related context ID.
In the below example, a context app configured for the Member has a custom table called Enquiry, where the configuration uses the ID field of the Enquiry as ID property, and the MemberID field as FK identifier. When using the context app to create a new Enquiry, the value of the MemberID FK is not set to the current member being viewed, but it is set to 0. This means that the new record is available for any Member.
Steps To Reproduce
Steps to reproduce the behavior:
Expected behavior
The value stored in the property marked as the FK identifier should be the ID of the context app node - in the above example, i would have expected MemberId on the Enquiries table to be populated with the Member ID.
As the value is saved as 0 (default non-nullable int) then it becomes available against every entity (member in this case)
Describe the bug When creating an entity from a context app, the FK property value is set to 0, not to the related context ID.
In the below example, a context app configured for the Member has a custom table called Enquiry, where the configuration uses the ID field of the Enquiry as ID property, and the MemberID field as FK identifier. When using the context app to create a new Enquiry, the value of the MemberID FK is not set to the current member being viewed, but it is set to 0. This means that the new record is available for any Member.
Steps To Reproduce Steps to reproduce the behavior:
Expected behavior The value stored in the property marked as the FK identifier should be the ID of the context app node - in the above example, i would have expected MemberId on the Enquiries table to be populated with the Member ID.
As the value is saved as 0 (default non-nullable int) then it becomes available against every entity (member in this case)
Screenshots
**Environment
This item has been added to our backlog AB#37143