I would welcome the addition of OnRecordCreate and OnRecordDelete triggers to FileMaker. This feature was new with FileMaker 10 and 11 added at least one new trigger (OnObjectValidate) so you never know what version 12 might have. You can certainly request this at Feature Suggestion Form if you want to requrest it.
In the mean time, you can add a "new record" button to your layout and use it to perform the script you want to control with this script trigger. If you have FileMaker Advanced, you can also use a custom menu to replace the standard New Record option with this script instead of placing a button on the layout.
You can also have an OnRecordLoad script trigger fire and that script can check to see if it's a new record and then creates the related record. Either it checks for the existence of a related record, or it checks a flag field that is set after the related record is created.
Thanks guys for your suggestion.
But the adding or creating of record in my application is a background process.I have used XML web publishing to add the records.To maximize the performance i want to create a related record in a different table within my application.i dont want to use XML web publishing to write the records in two different tables.
I am creating a new record in a table through web publishing.Based on that created record there should be a new record created in a different table which is under a different file.
Please suggest me as early as possible.
You may add the -script and the -script.param attributes to your url like this:
(You can also find this info in the manual: Fms11_cwp_xslt_en.pdf in the documentationfolder in the Filemaker Server Folder on you server. Pages 47 and 101)
I am not too sure that a (new to add by FMI) scripttrigger would be a good way to solve this. The -script attribute in the URL is a much better approach imho
Thanks menno your post oppened a wealth of new possibilities by mentionning thise URL I wasn't aware off !
That's awesome !
I will surely look into this and will apply it.
Will let you know soon how it worked for me.