Hi, I am having some trobles using multiple forms called one through another: I use 3 forms - F1, F2, F3. I open F1, and from it I call F2. Then, F2 calls F3 and closes. It stays only F3 and F1. I want that before closing F3 to be able to call a method on F1. Is there a way to accomplish this? Thanks, CD
Hi C D, Yes, there is a way to do it. When you are opening the F2 from F1 and then F3 from F2, write a funcion on the both the forms F2 and F3 as shown in the exmple below. now when you are opening the Form F2 from F1 call you function CalledbyOtherForm to populate the CalledByForm global variable. Again when opening the form F3 from F2 call this function with CalledByForm to populate the same globle variable on the F3 Form. you must use F1.run, so that you can call F1.CalledbyOtherForm just before F1.run. Example: VAR CalledByForm@1000000000 : Boolean; PROCEDURE CalledbyOtherForm@1000000000(CalledByForm2@1000000000 : Boolean); BEGIN CalledByForm := CalledByForm2; END; Now onQueryCloseForm Trigger you can say, IF CalledByForm THEN [Call you function from Form F1] I did that several times. I know its little massy, but you should be able to do it. have fun. Naveen Jain
Sorry, I replied based on Navision. But still I think logic should be same in Axapta. Naveen Jain