From a form I have to "save" the current record as follows:
1. I am on form A with record from table A:
· I click to open form-X with some code in.
...or
2. I am on form B with recordfrom table B:
· I click to open form-X with some code in.
...or
3. I am on form C with recordfrom table C:
· I click to open form-X with some code in.
In these 3 cases I need to know what is the current record... is it from A, B or C?
How?
Kind Regards
E-mail:
info@rainerbay.dk
Skype: rainerbaydk
0
Comments
If yes:
1. On Form X create a global for tables A, B and C
2. On Form X create a global option var. Options = (A,B,C)
3. On Form X create 3 functions (SetA, SetB, SetC). These fuctions should receive the appropriate record as a parameter and asign to the global record defined in step 1. They should also assign the appropriate value to the option var.
4. From the button on forms A, B, and C. Declare form X as a global. Call the appropriate function and run form X. (Don't forget to clear the form variable)
Form X can check the value of the option field to determine how it was called. And will have a copy of the record used to call it.
Hope this helps..
On my Bottom F9 code, can you define how... Error "its not allowed to run the form in this mode"... or am I just stupid... (maybe) :roll:
E-mail: info@rainerbay.dk
Skype: rainerbaydk
Can you please explain more, also functional, what you are trying to achieve? It sounds interesting but I do not completely understand the big picture. :?
I need to open same form from many other forms, same code and all.
Example:
From Customerform : Open new form and "look" at current customer
From Vendorform : Open new form and "look" at current vendor
From Itemform : Open new form and "look" at current Item
In the old N3 was these "funtions" dbSETCURREC(customer) and dbGETCURREC(customer).
The same is while you call a codunit forexample for booking invoice, and "send" the SalesHeader to the codeunit.
Rainer
E-mail: info@rainerbay.dk
Skype: rainerbaydk
PS. Welcome to Navision for windows.