Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Saving related recs on a form
Message
De
22/02/2002 18:42:30
Jason Mesches
Ocean Systems Engineering Corporation
Carlsbad, Californie, États-Unis
 
 
À
21/02/2002 19:25:30
Information générale
Forum:
Visual FoxPro
Catégorie:
The Mere Mortals Framework
Divers
Thread ID:
00622096
Message ID:
00624011
Vues:
40
OK, now I understand why the child obj records weren't saving... they were never created in the first place.

Purely out of curiosity, why are you using arrays to store the child obj data?

I guess the final answer to your question begins with a question... when do you want the child records created? It sounds as if you're waiting for a positive response from the parent obj's Save()?

If that's the case, I would suggest the parent obj's PostTransactionHook... that's the new method Kevin added that fires after the last transaction has been successfully ended.

The only reason the child biz obj's save won't work, is that the parent calls the child's IsChanged(), which checks to see if anything in the child obj's InitialSelectedAlias has been changed. Since you haven't added anything to the child obj's view yet, it will return .F. and the Save() will never be called. This is why you were never seeing the child obj's Save() fire in your original post.

-Hope that didn't muddy the waters too much more than they already were!
---J

>Yup everything is set ok. I think my biggest problem here is that I don't know where to put code to save records on the secondary bizobj. I understand that its not being saved because I'm using arrays to enter in the data and of course the system wouldn't know that I want to save this data in separate records in the 2nd table. Do you know the best place to put the code to convert the array to records I can insert? I tried in the postsave of the primary bizobj but that didn't work. Can I put it in the save of the 2ndary bizobj even tho' no record is being directly saved from the data on the form?
>
>Thanks for your help!
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform