hello everyone,
on the sales order form, i want to be able to select (highlight) a line in the subform, which is table Sales Order Subform and then hit a button, and then from there pass the values on the line and do something. for example, on the line, Type=item and No.=123, then when i highlight the line and hit my button, it will pass Type, No. and whatever else fields i need.
i have created a new function in my subform, with lets say in my example with 2 parameters. so when i hit the button on the main form,
CurrForm.SalesLines.FORM.mynewFunction(Type,"No.");
my new fn will run and get passed the 2 fields i need.
the problem is that the values are NOT the values on the Line but instead the value of the Sales Header record instead of the Sales Line record.
how do i select the values of the LINE and not the header?
i could just pass the header "No." field which is the primary key for table Sales Header and then filter my Sales Line table by that number, but i don't know how to tell Navision the line i want is the one selected? so therefore i won't be able to filter the sales line table b/c i don't know how to retreive the highlighted line?
it might just be a simple native function that i don't know about...or something simple, but i can't figure it out!!! ](*,)
any help is greatly appreciated..
0
Comments
geez...i don't even need to pass any parameters...the code
CurrForm.SalesLines.FORM.mynewFunction;
will automatically filter the line that i'm on... so if i'm on line = 40000
then when i get into my new function on the subform, the code already knows that is my filter.... DOH!!!!