The problem is that I’m not creating any records through the relationship company_t_to_notes_t. But if I don’t allow record creation through the relationship I get an error!
Strangely I managed to avoid this by allowing record creation in the relationship, but this is not expected behaviour.
I can also avoid the issue by moving the popup from the record row to header. Then I have the expected behavior, that is I don’t need to allow record creation in the relationship.
I’m puzzled
My first guess is that this is a bug.
Anyone has faced this? Am I wrong?
the “foundset” you are working on is a related foundset, use controller.loadAllRecords to remove a relatedfoundset and place back a normal foundset (non related)
Jan Blok:
the “foundset” you are working on is a related foundset, use controller.loadAllRecords to remove a relatedfoundset and place back a normal foundset (non related)
Is not running on the main form and it is not creating a record through a relation. That fact is very clear when I put the button that triggers the code in the header part. There is no error
Now, why should it raise an error if instead of being placed on the header part the button is placed in the body part?
Your form contains a related foundset, many calls are forwarded via the controller to the foundset, so you are in fact talking to a related foundset.
As told in the previous post, controller.loadAllRecords() removes the related foundset (and shows all records from the form table)
Jan Blok:
Your form contains a related foundset, many calls are forwarded via the controller to the foundset, so you are in fact talking to a related foundset.
Ok.
I was under the impression that for the relation restriction to operate I would have to be working expressly through the relation as in: