HI,

the class Global has a method "formHasMethod", to avoid a stack trace at 
runtime you might want to check if the caller has the method before you 
executes it using object. Object cannot validate the existence of the method 
during compilation.
Best regards
Jesper
Von: development-axapta@yahoogroups.com 
[mailto:development-axa...@yahoogroups.com] Im Auftrag von Malcolm Burtt
Gesendet: Mittwoch, 2. September 2009 17:24
An: development-axapta@yahoogroups.com
Betreff: RE: [development-axapta] How to call a form method from method of 
other form



Hi

Assuming that form B has been called from form A you can say...

void B()
{
Object formAobj = element.args().caller();
;
// Check that this form was opened from FormA
If ( formAobj && formAobj.name() == formstr(FormA) )
{
// Call method A on FormA
formAobj.A()
}
Return;
}

Regards

Malcolm Burtt
Touchstone Group
People - Partnership - Solutions

From: 
development-axapta@yahoogroups.com<mailto:development-axapta%40yahoogroups.com> 
[mailto:development-axapta@yahoogroups.com<mailto:development-axapta%40yahoogroups.com>]
 On Behalf Of shamikask
Sent: 21 August 2009 17:39
To: 
development-axapta@yahoogroups.com<mailto:development-axapta%40yahoogroups.com>
Subject: [development-axapta] How to call a form method from method of other 
form

Hello All,

During the AX 4.0 development, I got stuck up at a point -
Basically situation is like -
Form A is having method A
Form B is having method B
Now I want to call method A in method B, How can I do it?
Anybody help me out, please.

Thanks,
Shamika

[Non-text portions of this message have been removed]



[Non-text portions of this message have been removed]

Reply via email to