Why dont you use the AxBC classes instead? I.e. AxSalesTable and AxSalesLine,
:-J
Jacob Hjelmer
Thy Data Center Development A/S
Søvej 13b
DK-3460 Birkerød
Denmark
URL : http://development.thydatacenter.dk/ <blocked::http://development.thydatacenter.dk/>
E-mail: [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>
________________________________
From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Brandon George
Sent: 8. juli 2005 15:25
To: [email protected]
Subject: RE: [development-axapta] Re: Importing external sales order
You are correct about both of those... And the <table>.clear I did do within
my class, but I did forget to add it to this example.
However if you read the code you will notice the <table>.initValue is
called, but called from different methods: Examples from the code:
salesTable.initFromCustTable();
...
salesLine.initFromSalesTable(salesTable);
If you look both of these methods perform the initValue, but they also add
other information, that is important from the CustTable and SalesTable.
-Brandon
-----Original Message-----
From: [email protected]
[mailto:[EMAIL PROTECTED] On Behalf Of Karsten Krabbes
Sent: Friday, July 08, 2005 8:55 AM
To: [email protected]
Subject: [development-axapta] Re: Importing external sales order
Please be aware, when creating new records in tables you should call two
more methods before filling the fields:
<table>.clear() .. to make sure your new record is really empty.
<table>.initValue() .. the super() call here calls the recordtemplate
function !!
br
Karsten
--- In [email protected], "Brandon George"
<[EMAIL PROTECTED]> wrote:
> The following, when placed in a job will create a SalesOrder. This
should
> show you exactly how to create one, and from this code you could
then create
> yourself a class, for processing your external Sales Orders.
>
> SalesTable salesTable;
> SalesLine salesLine;
> NumberSeq numberSeq;
> NumberSequenceReference numberSequenceReference;
> InventTable InventTable;
> ;
>
> numberSequenceReference = NumberSeqReference::findReference
> (typeId2ExtendedTypeId(typeid(SalesId))) ;
> numberSeq = NumberSeq::newGetNumFromCode
> (numberSequenceReference.NumberSequence) ;
>
> ttsbegin;
>
> // Entry for Sales Header
> salesTable.SalesId = numberSeq.num() ;
> salesTable.CustAccount = "10" ;
> salesTable.initFromCustTable();
> salesTable.SalesType = SalesType::Sales ;
> salesTable.SalesStatus = SalesStatus::None ;
> salesTable.insert();
>
> // Entry for Sales Line
> InventTable = InventTable::find("1000");
> salesLine.initFromSalesTable(salesTable);
> salesLine.SalesId = salesTable.SalesId ;
> salesLine.ItemId = InventTable.ItemId;
> salesLine.SalesQty = 1 ;
> salesLine.createLine(false,true,true,false,false,true);
> numberSeq.used();
>
> ttscommit;
>
> If you have any questions about the code please let us all know!
Also
> SalesAutoCreate will show you a similar thing, except it will be
more
> complicated... Using this to build your Class on will speed up the
process.
> This code works, and I am currently finishing up an
ExternalOrderProcessing
> Class that was based on this code.
>
> -Brandon
>
> -----Original Message-----
> From: [email protected]
> [mailto:[EMAIL PROTECTED] On Behalf Of Rolf Olsen
> Sent: Friday, July 08, 2005 3:53 AM
> To: [email protected]
> Subject: RE: [development-axapta] Importing external sales order
>
>
> You should take a look at the SalesAutoCreate class hierarchy, that
does
> what you need (although you should probably make a sub class for
your
> specific import).
>
> Kind regards,
> Rolf
>
> -----Original Message-----
> From: [email protected]
> [mailto:[EMAIL PROTECTED] On Behalf Of Zappia
Alessandro
> Sent: 8. juli 2005 09:38
> To: [email protected]
> Subject: [development-axapta] Importing external sales order
>
> Hello everybody!
> I'd like to create an interface between axapta and an existing web
site for
> sales orders. These orders are passed to axapta using an ascii text
file and
> I should pick them up and import into axapta's SalesTable (and
salesLine,
> obviously!). I'd like also to replicate all the checks performed by
axapta
> as if the order were inserted manually, to notify possible errors.
Is there
> a class that helps me ot at which I should take a look?Or anyone
has some
> other suggestions?
> Thank you all very much!
>
>
>
> [Non-text portions of this message have been removed]
>
>
>
>
>
>
> Yahoo! Groups Links
>
>
>
>
>
>
>
>
>
>
>
> Yahoo! Groups Links
Yahoo! Groups Links
________________________________
YAHOO! GROUPS LINKS
* Visit your group "development-axapta <http://groups.yahoo.com/group/development-axapta> " on the web.
* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>
* Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service <http://docs.yahoo.com/info/terms/> .
________________________________
[Non-text portions of this message have been removed]
---- LSpots keywords ?> ---- HM ADS ?>
YAHOO! GROUPS LINKS
- Visit your group "development-axapta" on the web.
- To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
- Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.

