Cécile

"Catching" + New Record or simultaneous record creation

Discussion created by Cécile on Sep 11, 2017
Latest reply on Sep 12, 2017 by philmodjunk

Table: Dossiers   Field : ƒid_Case      Field DossierNumber     Field ID_Dossier (record PK)

Table: Cases       Field :  ID_CASE   Field CaseNumber

 

When user click on toolbar + New Record, in layout Dossiers, the serial DossierNumber gets created on commit. When that happens, I want a way to trigger the creation of a new ID_CASE and set the Field CaseNumber value=1.

 

My relation is     ƒid_Case >- ID_CASE   (well for some reason FM doesn't do it many to one but one to one in the graph)

And I have create record through this relationship checked on the CASES table side (double checked!)

It does work: on the layout Dossiers, if I allow modification of the field Cases::CaseNumber, when a new record DossierNumber is created, if I type 1 in the Cases::CaseNumber, the record gets created in the table CASES and I can monitor by seing the ƒid_Case field getting populated on the Dossiers layout.

 

So the process works and I can script that but I have no idea how and when to trigger the script ? There is no On New record create afaik?

Outcomes