Look at the class called AxCustTable it has everything you need to create the 
customers already.
 
it is used in the EP class

________________________________

From: [email protected] on behalf of mrkaarel
Sent: Fri 2008/11/28 03:52 PM
To: [email protected]
Subject: [development-axapta] Re: Creating customers programmatically



Okay, here's what I came up with (looks like it wasn't so difficult 
as I feared). Please, can someone with a little bit more experience 
tell me, if there's anything I should change in this hacked up code; 
something's that really prone to break. Thanks again.

---
NumberSeq numberSeq;
CustTable custTable;
;

ttsbegin;

numberSeq = NumberSeq::newGetNum(CustParameters::numRefCustAccount(), 
true);
custTable = CustTable::find(CustParameters::find().defaultCust);

custTable.AccountNum = numberSeq.num();
custTable.initValue();
custTable.Name = "Test 2";
custTable.CustGroup = "ERA";
custTable.Country = "EE";
custTable.setPaymentReference();
//specific address not needed right now
custTable.Address = Address::FormatAddress("", "", "", "EE", "", "");

custTable.insert();
numberSeq.used();

ttscommit;
---



 


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

Reply via email to