Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Saving related recs on a form
Message
From
21/02/2002 19:25:30
 
 
To
19/02/2002 15:41:26
Jason Mesches
Ocean Systems Engineering Corporation
Carlsbad, California, United States
General information
Forum:
Visual FoxPro
Category:
The Mere Mortals Framework
Miscellaneous
Thread ID:
00622096
Message ID:
00623505
Views:
30
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!



>I know it sounds too elementary, but I gotta ask... did you set the cParentBizObj property of the secondary BizObj to match the exact name of the primary BizObj on the form? That's the only thing I can think of that you haven't mentioned doing.
>
>Also, make sure lCascadeMessages is set to .T. (default), otherwise none of the coordination between parent/child objects will work.
>
>If that doesn't work, you might try stepping through the code to see why it's not calling the child BizObj's Save(). You shouldn't have to put any extra code in, the framework should <s> handle it correctly!
>-Hope that helps
>---J
>
>>My form's primary object is getting saved fine. However, I have another business object on one of the pages that relates to several fields on the form. When I update these fields and save the primary BO data, I want the form to also save the secondary business object's records (which will be 5-10 separate records that include the primary BO key on each record). I have the secondary BO set to save child when parent is saved. This does nothing. What am I missing here? Its driving me crazy. Where should I put any necessary code? I tried in the postsave of the primary BO with no luck. TIA.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform