Hi everyone!
I'm newbie in Dynamics Nav and on this forum.
I'm studying to get certification in Develop, and I'm practising with any kind of exercize in programming C\AL.
Now, I don't know how I can relate a field of a subform to another table: I would modify a value in a field in a table when I modify the same field in the subform. I think I should use flowfield but I don't know how. This value has to be modified when button OK is pressed . How can I call button action (that is in the main form) using the subform?
I apologize for my english.
Thanks,
regards
Luciana
0
Comments
No "ok" button or whatsoever needed...just go ahead with the PDF
EDIT: wait, i probably misunderstood your question:
you have a document-like form, and you want a subform pointing to table "A" that after some action has to modify another field on table "B"...well, if so little info, i cannot say what's the best way to do it. Maybe a validate is enough, or maybe you cannot use flowfields, or maybe you have to make a function and then call it somewhere else.
Can you please give more details?
"Never memorize what you can easily find in a book".....Or Mibuso
My Blog
I have a form that looks like Purchase Order: I have a form header and then a subform who's related to.
In Form Header I have 3 fields: Nro., Status (option) and Type (otion).
In Subform I have different fields, one of this has to modify a table similar to Item table. Both the fields show a number.
When "Status" is in one of the two options, I have to look at "Type".
For Option 1 of "Type" , the field in subform has to modify the field in the other table so the number of this table has to decrease, for Option 2 of "Type , the number of the table has to increase.
E.g.
Table
FieldTable
10
Field Subform
5
Subform --> "Type" = option1 ---> THEN FieldTable = 10-5 =5
ELSE IF "Type" = option2
> THEN FieldTable =10+5 = 15
This has to happen when I press OK Button
So my question is:
How can I execute action in subform when I press the button (that, in the form designer, belongs to the Form Header)?
How can I relate the field of the subform with the field of the table, so the field of the table is modified ONLY when I press this button?
I don't have read anything on the guide to C/AL, and I know that I could look at the database Cronus, but I don't have database Cronus and I don't know how to do this.
I know that perhaps I should have only setup right table, as wharehouse or something similar, but I have to do this exercize to understand in a better way C/AL programming language.
Thanks
Luciana
I think that anyone will find hard time to help you because you're basically asking a step by step guide to solve your problem (honestly, i don't know with what suggestion to start with, it's like starting from zero). You should build a base knowledge of C/SIDE (not C/AL, but C/SIDE in general) before trying these things (and if i understood you requirement correctly, it's not that easy...it's not hard, but definitely not easy, if you just started learning NAV).
Isn't there a senior developer to help you?
"Never memorize what you can easily find in a book".....Or Mibuso
My Blog
No, I don't.