[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.axapta.programming

Retrieving form value from a class

Thomaslp

2/2/2006 8:40:00 AM

Hello,

I have a form that contains a grid with the custtable. On the form there is
a button that calls a class. The class needs to know which line that is
selected in the grid and retrieve the customer account number. How can I do
this. Ofcourse I could pass it as a parameter when calling the class, but I
think that I heard somewhere that I can retrieve it from the the args. Is
this correct and how do I do this? A short example would be nice.

regards
Thomas
2 Answers

sjain

2/2/2006 9:11:00 AM

0

Hi,

Write the code below in the main method of the class.

CustTable custTable;
CustAccount custAcc;
;
custTable = args.record();
custAcc = custTable.AccountNum;

Here you can use the variable custAcc wherever needed.

Regards
Sjain

"Thomaslp" wrote:

> Hello,
>
> I have a form that contains a grid with the custtable. On the form there is
> a button that calls a class. The class needs to know which line that is
> selected in the grid and retrieve the customer account number. How can I do
> this. Ofcourse I could pass it as a parameter when calling the class, but I
> think that I heard somewhere that I can retrieve it from the the args. Is
> this correct and how do I do this? A short example would be nice.
>
> regards
> Thomas

sjain

2/2/2006 9:17:00 AM

0

Hi,

Write the code below in the main method of the class.

CustTable custTable;
CustAccount custAcc;
;
custTable = args.record();
custAcc = custTable.AccountNum;

Here you can use the variable custAcc wherever needed.

Regards
Sjain


"Thomaslp" wrote:

> Hello,
>
> I have a form that contains a grid with the custtable. On the form there is
> a button that calls a class. The class needs to know which line that is
> selected in the grid and retrieve the customer account number. How can I do
> this. Ofcourse I could pass it as a parameter when calling the class, but I
> think that I heard somewhere that I can retrieve it from the the args. Is
> this correct and how do I do this? A short example would be nice.
>
> regards
> Thomas