Hi,
Please suggest on how to create a number sequence without using any class in ax 2012 r3.
Please advice.
Regards,
AXTechie 2120
*This post is locked for comments
Hi,
Please suggest on how to create a number sequence without using any class in ax 2012 r3.
Please advice.
Regards,
AXTechie 2120
*This post is locked for comments
No, you can't. Object-oriented programming is based on classes and their methods, not just some standalone procedures.
What are you trying to achieve by not using classes? Maybe we can tell you how to achieve that in way that actually is possible.
Hi martin,
For reusing the unused numbers in number sequence i used the below code in the delete method,
NumberSeq::releaseNumber(BTC_empl::numseqid().NumberSequenceId,numseqid);
but can we reuse the unused numbers in number sequence with replacing the above code with some code that does not use any methods of any class.
It's also covered by the white paper I gave you; please look at it.
You'll notice the following code in delete() method of the form datasource:
public void delete() { element.numberSeqFormHandler().formMethodDataSourceDelete(); super(); }
Forget about not using classes; it's not possible. Maybe you won't use them directly, but you can't avoid using classes.
Thanks for your reply,
But what i Want is if the number sequence is deleted i want to make that deleted number reusable, and i know that we can do it by use the class NUMBERSEQ and ReleaseNumber Method in that class.
Now what i want is the I dont want to use that class,without using that class can we do the reusing of number sequence which are deleted.
Regards,
AX Techie 2120
Read point# 19 from the document which I given you as a link in above reply.
www.dynamics101.com/creating-custom-number-sequences-microsoft-dynamics-ax-2012
Hi martin,
THanks for you reply,
I just wrote a job to create a number sequence and i have inserted that number sequence in the table.
Now i have created a two methods in the table like this,
client server static NumberSequenceReference numseqid()
{
return NumberSeqReference::findReference(extendedTypeNum(Numseqid2));
}
and then
public void initValue()
{
NumberSeq numberseq;
super();
numberseq = NumberSeq::newGetNum(BTC_empl::numseqid());
this.NumSeq = numberseq.num();
}
Everything is good upto now,but whenever I open the table or form and press Ctrl+N its says that the Number sequence reference is missing.
I know how to add a reference for a number sequence,but how can i do that in the Job where i inserted the number sequence into the numbersequence Table.
Please advice.
AXTechie 2120
What exactly are you doing? This sounds more like you're trying to assign a number from a sequence and the question not about creating a new number sequence.
If it's the case, find Forms example section in Using the Enhanced Number Sequence Framework (White paper); it'll tell you how to use NumberSeqFormHandler class in a form.
Hi guys,
Thank you for your replies.
I have already created a number sequence using a job and that number sequence is insereted in the table.
Now i want to use that number sequence in my form.
Please suggest how to achieve this.
Regards,
AXTechie 2120
You can also create a custom number sequence like mentioned below link e.g. for customer group:
www.dynamics101.com/creating-custom-number-sequences-microsoft-dynamics-ax-2012
Hi AXTechie2120,
Trust you fine!
Can you please clarify you question what you want to achieve, is you talking about a new number sequence which you want to configure? Please specify the number sequence which you want to create!
André Arnaud de Cal...
292,516
Super User 2025 Season 1
Martin Dráb
231,407
Most Valuable Professional
nmaenpaa
101,156