Thanks, this is it!



--- In [EMAIL PROTECTED], "Jacob Hjelmer Nielsen"
<[EMAIL PROTECTED]> wrote:
> Try this, taken from the Best Practice Handbook.

> :-J

> Systemdeveloper
> Jacob Hjelmer

> Thy Data Center Development A/S
> Søvej 13b
> DK-3460 Birkerød
> Denmark

> Phone : +45 96 170 470
> Fax   : +45 45 824 544

> URL   : http://development.thydatacenter.dk/
<blocked::http://development.thydatacenter.dk/
> E-mail: [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> 

>
> Modifications involving number sequences      
>

> Below is a short description of how to implement the number sequence
framework for a new module in Axapta. The description is presented
step-by-step. Some of the steps might be irrelevant if they have been
carried out previously for other purposes in your new Axapta module.
> The new module is referred to as MyModule in the description.
> 1.      Create a parameter table for the new module:
MyModuleParameters. This table must follow the standard Axapta design
for parameter tables. This means that the table must, at a minimum,
contain a Key-field, and the standard method: Find. Furthermore, some
standard methods must be overloaded (delete and update). These can be
copied from one of the other parameter tables.

> 2.      Add your module to the NumberSeqModule in Base Enums.
>
> Note
>
> The module name is used to detect the active number sequence
references in your Axapta installation.
> 3.       Implement static methods.
> o        MyModuleParameters::numberSeqModule()
> Reference your module here:
> o        MyModuleParameters::numberSeqReference()
> Copy these from one of the other parameter tables, and change the names
> 4.      Add line in method.
> Add MyModuleParameters::Find() in method Company.selectParameters()
> 5.      Create a form to display the new parameter table.
> It's important that the functionality of number sequence references
is copied exactly from one of the other parameter forms (e.g., copy
methods, query, properties, etc.) Remember to correct names of the
called methods
> 6.      Create new class.
> NumberSeqReference_MyModule and let this class extend class:
NumberSeqReference
> 7.      Add line in method.
> NumberSeqReference::Construct()
> Copy one of the existing lines and change the class name.
> 8.      Add line in method.
> NumberSeqReference.loadAll()

> Copy one of the existing lines, and change the name of parameter table.

> Your framework is now established. When you run your new parameter
form, you should not get any errors. On the Numbersequence tab page,
you should get the message: 'No setup required'.
>
> To make number sequence references for your new module, you must:
>
> *         Override the NumberSeqReference.loadModule() method.
> *         Create a new method: NumberSeqReference_MyModule.loadModule().
> In this new method, specify each reference needed in your new module.

> Please refer to the documentation on NumberSeqReference.loadModule()
method for details on how to create a reference.

> After creating your references, the system will automatically detect
them when opening the new parameter form. This is now visible in the
grid on the Numbersequence tab page.
>
> How to refer to your new references
>
> For each reference specified in
NumberSeqReference_MyModule.loadModule(), you must create a static
method on your parameter table. Assuming you have specified a
reference for the data type MyDataType, you need to create the method
MyModuleParameters::numRefMyDataType().

> Copy a numRef method from one of the other parameter tables, and
change the names of the method to numRefMyDataType, and the referred
datatype to MyDataType.

> You are now ready to use the reference from the X++ code, for example:

> MyNewId =
NumberSeq::newGetNum(MyModuleParameters::numRefMyDataType()).num();


> ________________________________
>
> From: byteway_so [mailto:[EMAIL PROTECTED]
> Sent: 29. oktober 2004 13:36
> To: [EMAIL PROTECTED]
> Subject: [development-axapta] number sequence

>
>
> Hi all,
>
> Perhaps this is a silly question, but is there a way to check if a
> number sequence exist from x++ code?
>
> I thought I would get full acces to them by using a variable of the
> type NumberSeq. But I can't see how.
> Logically the next question would be: if this is possible, would i be
> able to create a new number sequence with X++ if the number sequence
> did not exist.
>
> Any thoughts on this are welcome.
>
> /b
>
>
>
>
>
>
>
>
>
> Yahoo! Groups Sponsor
>
<http://us.ard.yahoo.com/SIG=1295a0fsf/M=281955.5530326.6602771.3001176/D=groups/S=1705006764:HM/EXP=1099136615/A=2343726/R=0/SIG=12ii1psnh/*http:/clk.atdmt.com/VON/go/yhxxxvon01900091von/direct/01/&time=1099050215246010>
<http://us.ard.yahoo.com/SIG=1295a0fsf/M=281955.5530326.6602771.3001176/D=groups/S=1705006764:HM/EXP=1099136615/A=2343726/R=1/SIG=12ii1psnh/*http:/clk.atdmt.com/VON/go/yhxxxvon01900091von/direct/01/&time=1099050215246010>

> Get unlimited calls to
<http://us.ard.yahoo.com/SIG=1295a0fsf/M=281955.5530326.6602771.3001176/D=groups/S=1705006764:HM/EXP=1099136615/A=2343726/R=1/SIG=12ii1psnh/*http:/clk.atdmt.com/VON/go/yhxxxvon01900091von/direct/01/&time=1099050215246010>

> U.S./Canada
<http://us.ard.yahoo.com/SIG=1295a0fsf/M=281955.5530326.6602771.3001176/D=groups/S=1705006764:HM/EXP=1099136615/A=2343726/R=1/SIG=12ii1psnh/*http:/clk.atdmt.com/VON/go/yhxxxvon01900091von/direct/01/&time=1099050215246010>

>
<http://view.atdmt.com/VON/view/yhxxxvon01900091von/direct/01/&time=1099050215246010>

>
<http://us.adserver.yahoo.com/l?M=281955.5530326.6602771.3001176/D=groups/S=:HM/A=2343726/rand=646316388>


> ________________________________
>
> 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]>

>        
> *      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]







Yahoo! Groups Sponsor

Get unlimited calls to

U.S./Canada



Yahoo! Groups Links

Reply via email to