tnzabo
12th December 2005, 18:57
Hi - I've searched here and haven't been able to find help specifically for this problem I'm having. I have copied the Enter Hours Accounting form and started a new session using it. I have also broken the form into two where the Project/Prod order and all the quantity stuff that is at the bottom after the multi-occ records is now on a second form in multi-occ format.

The problem I am having is when I'm entering more than one record. I can start the session and enter a record, it will move to the second form correctly and I can enter the info on the second form and save the record with no problem. If I do another insert, while still in the session, I fill the info in the next record on the first form, it moves to the second form, I fill that info in then go back to the first form and everything is gone from this record I'm currently entering. Even if I stay on the second form and click save I get errors that the work center doesn't exist. It must blank everything upon moving to the second form. I'm not sure what to do. Like I mentioned I can enter the first record with no problem.

I'm using the to.form(next.form) code in the after.field of the last field on my first form to get to the second form.

Any info would be great. Thanks so much!

tnzabo

Hitesh Shah
12th December 2005, 19:03
Check these functions . Save the record buffer before to.form and restore the same in before.form f next form. It should help u accomplish ur task.

beginer
13th December 2005, 06:33
Hi ,

We also use to face some wiered behaviour with multi occ. forms with multiple forms attached.

To overcome this ...what we have done is to a Multi - Occ session with single form ..we have linked a Synchronized Session with form defined as Multi Occ. but with Single Occ.

Little bit confusing right !!!!
I will try to make it more clear :)

Main Session - Multi Occ Session
This is Synchronised to a Maintain Session ... Form is Multi Occ.
But the Occ. is set to 1.....
So in view it would be a Single occ type... & here u can arrange all the fields as u desire & can even fit on one form.

toolswizard
13th December 2005, 13:50
You said the form is blank when you return. And only once did you say the work center is invalid. Does the entry actually get saved to the table.

Normally when working with multi occurance screens, you fill in the first form completly, all rows. When you go to the second form, or any action, Baan performs a save. The method in which you have designed your form, it is behaving more like a form type 1. There are 3 standard design methods you might try.

First, change the session to a form type 1 since it seems that you have more data than a form type 2 can hold on a single form.

Or, second, keep index fields on the first form as a type 2. On the second form, make it a form type 1. When entering data on form 1, be sure that any missing fields have proper defaults. Remember, when you perform any other action like going to form 2, there is a save performed anyway. You can fill in the whole form 1 and default the data, or, use form 2 in a single occurance mode and do all your editing there giving the user either choice. The maintain table and maintain domains sessions use this method.

Or, third, create a session set where the top of the session is a multi occurance display, and the bottom is a single occurance maintenance. This is how maintain sales orders works.

Hitesh Shah
13th December 2005, 15:47
Try save.rcd.main(actual.occ) and restore.rcd.main(actual.occ) .

tnzabo
15th December 2005, 20:44
Hello - thanks for all suggestions. It seems the save and restore commands have done the trick. It still seems to be acting a little funny but it's working. Thanks again!