I have now made a simpel class just to try and use the functionality
in axapta but when i call it from product builder it just says object
xx is not initialized. The example is placed here under:


[Class]
public class xx
{
int x;
int y;
int c;
}

[Method]
public void Xmethod(int a, int b)
{
x=a; //Initializing here i suppose
y=b;

c=x+y;
}

[method 2]

int Omethod()
{
return c;
}

i assume that i can call the method in product builder as this ( i
made a class variable named A):

A.Xmethod(4,5);

and by calling method 2 you would get the answer:

Answer = A.Omethod();

Can any one help ?


--- In [EMAIL PROTECTED], "luisxbmo"
<[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> Fabrice has already given you one way to do it.
>
> However you can do it all in the method that you are overriding or
> adding, or actually you can place all the code in a class and then
> instantiate it and evoke whatever method you have placed the code
in.
>
> Where to place the code is really a philosophical matter. Keep it in
> the class you are using it if it specific to it. Place it in a class
> if it could be used elsewhere. In your case as I understand it, I
> would make a class for it since it seems like some pretty generic
> functionality, but as I say that's philosophy!
>
> Hope this helps + regards,
>
> --- In [EMAIL PROTECTED], "affekatz"
<[EMAIL PROTECTED]>
> wrote:
> >
> >
> > Im using the example from technet as startingpoint it looks
something
> > like this:
> >
> > [Class]
> >
> > OdbcConnection C;
> > Statement S;
> > LoginProperty LP = new LoginProperty();
> >
> > [The called to be done in product builder]
> >
> > LP.setDatabase("DB_name");
> > LP.setUsername("dbu");
> > LP.SetPassword("Pass");
> >
> > C = new OdbcConnection(LP);
> > S = C.CreateStatement();
> > S.executeUpdate("DELETE FROM test_table");
> >
> >
> > In The [] I have put where i believe the "code" should be typed
could
> > you please help a bit ?
> >
> >
> >
> > --- In [EMAIL PROTECTED], "affekatz"
<[EMAIL PROTECTED]>
> > wrote:
> > >
> > >
> > > Thank you ill try it later today ... ill report back if my
> > > programming skills was good enogh :-)
> > >
> > > --- In [EMAIL PROTECTED], "Fabrice Perez"
> > > <[EMAIL PROTECTED]> wrote:
> > > >
> > > > If the class you need doesn't exist in the AOT, you should
create
> > > it in the
> > > > AOT first.
> > > >
> > > > Then in Product Builder you declare a class variable with
> > reference
> > > to this
> > > > particular class, and initialize the class variable by
calling its
> > > > constructor method.
> > > >
> > > > 
> > > >
> > > > 
> > > >
> > > > Fabrice Perez
> > > >
> > > > MicrosoftR Business Solutions
> > > >
> > > > Certified Master - AxaptaR
> > > >
> > > > General Application, Finance, Trade & Logistics, Production,
> > > Projects, Shop
> > > > Floor Control, Product Builder
> > > >
> > > > 
> > > >
> > > > Mobile:    +65 9836 4065
> > > >
> > > > Fax:         +65 6234 1709
> > > >
> > > > E-mail:    [EMAIL PROTECTED]
> > > >
> > > > 
> > > >
> > > >
> > > >
> > > > 
> > > >
> > > > FEBE Consulting http://web.singnet.com.sg/~fperez/
> > > >
> > > >   _____ 
> > > >
> > > > From: affekatz [mailto:[EMAIL PROTECTED]
> > > > Sent: Wednesday, October 27, 2004 8:07 PM
> > > > To: [EMAIL PROTECTED]
> > > > Subject: [development-axapta] Code node in product builder
> > > >
> > > > 
> > > >
> > > >
> > > >
> > > > I found the code to connect to a external database ( ODBC )
but
> > now
> > > i
> > > > need to load the data in a productmodel in the
productbuilder. My
> > > > question is do i need to create some sort of class to handel
the
> > > > connection or can i just use the "code node" ( in the product
> > > tree )
> > > > in productbuilder to make the connection and assign the
values to
> > a
> > > > variabel there ? 
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > Yahoo! Groups Sponsor
> > > >
> > > >
> > > >
> > > > ADVERTISEMENT
> > > > 
> > > >
> > >
> >
<http://us.ard.yahoo.com/SIG=129e6v690/M=315388.5529720.6602079.300117
> > > 6/D=gr
> > > >
> > >
> >
oups/S=1705006764:HM/EXP=1098972992/A=2372354/R=0/SIG=12id813k2/*https
> > > :/www.
> > > > orchardbank.com/hcs/hcsapplication?
> > > pf=PLApply&media=EMYHNL40F21004SS> click
> > > > here
> > > >
> > > >
> > > > 
> > > > <http://us.adserver.yahoo.com/l?
> > > M=315388.5529720.6602079.3001176/D=groups/S=
> > > > :HM/A=2372354/rand=726984651>
> > > >
> > > > 
> > > >
> > > >   _____ 
> > > >
> > > > Yahoo! Groups Links
> > > >
> > > > *      To visit your group on the web, go to:
> > > > http://groups.yahoo.com/group/development-axapta/
> > > >  
> > > > *      To unsubscribe from this group, send an email to:
> > > > [EMAIL PROTECTED]
> > > > <mailto:[EMAIL PROTECTED]
> > > subject=Unsubscribe>
> > > >  
> > > > *      Your use of Yahoo! Groups is subject to the Yahoo!
> > > > <http://docs.yahoo.com/info/terms/>  Terms of Service.
> > > >
> > > >
> > > >
> > > > [Non-text portions of this message have been removed]




Yahoo! Groups Sponsor
ADVERTISEMENT
click here


Yahoo! Groups Links

Reply via email to