I would like to learn how to create a new number sequence in an existing module. I don't want to associate it with a field table or form, only it will be used to write in a report, and by the web doesn't help me, but by code does.
Thanks.
*This post is locked for comments
In D365 number sequence is lot more similar to AX2012, all you need to do is to add below method in your numbersequence class.
public NumberSeqModule numberSeqModule()
{
//Sales & Marketing Module
return NumberSeqModule::CRM;
}
It is a method of numberSequence class, by overriding this method you can define your module in which you want to create your number sequence.
The key is NumberSeq::newGetNum(LedgerParameters::numRefNumSeq()).num();
André Arnaud de Cal...
291,979
Super User 2025 Season 1
Martin Dráb
230,848
Most Valuable Professional
nmaenpaa
101,156