Notifications
Announcements
No record found.
Hello everyone,
I am facing a strange issue regarding the Number Sequence. I followed steps from the internet to create a Number Sequence, and I also reviewed some scenarios that the system provides for generating a Number Sequence.
I wrote and executed this code, and it worked fine in my development environment:
public class EMNumberSeqModule extends NumberSeqApplicationModule { [SubscribesTo(classstr(NumberSeqGlobal),delegatestr(NumberSeqGlobal, buildModulesMapDelegate))] public static void buildModulesMapSubsciber(Map numberSeqModuleNamesMap) { NumberSeqGlobal::addModuleToMap(classnum(EMNumberSeqModule), numberSeqModuleNamesMap); } public NumberSeqModule numberSeqModule() { return NumberSeqModule::Vend; } protected void loadModule() { NumberSeqDatatype datatype = NumberSeqDatatype::construct(); datatype.parmDatatypeId(extendedTypeNum(DynamicsDeductionNum)); datatype.parmReferenceHelp(literalStr("Unique key used for the Deduction.")); datatype.parmWizardIsContinuous(false); datatype.parmWizardIsManual(NoYes::No); datatype.parmWizardFetchAheadQty(10); datatype.parmWizardIsChangeDownAllowed(NoYes::No); datatype.parmWizardIsChangeUpAllowed(NoYes::No); datatype.parmSortField(1); datatype.addParameterType(NumberSeqParameterType::DataArea, true, false); this.create(datatype); datatype = NumberSeqDatatype::construct(); datatype.parmDatatypeId(extendedTypeNum(DynamicsRequestNum)); datatype.parmReferenceHelp(literalStr("Unique key used for the Loan.")); datatype.parmWizardIsContinuous(false); datatype.parmWizardIsManual(NoYes::No); datatype.parmWizardFetchAheadQty(10); datatype.parmWizardIsChangeDownAllowed(NoYes::No); datatype.parmWizardIsChangeUpAllowed(NoYes::No); datatype.parmSortField(2); datatype.addParameterType(NumberSeqParameterType::DataArea, true, false); this.create(datatype); } }
However, when I create a package and deploy it to the UAT environment, I find that only one Number Sequence is added, while the other is ignored.
I tried searching for a solution but couldn't find anything useful.
Here are some screenshots comparing the development environment with the UAT environment: DEV:
UAT:
sql
CopyEdit
SELECT * FROM NumberSeqDatatype WHERE DataTypeId IN ('DynamicsDeductionNum', 'DynamicsRequestNum') If missing, try running the "Generate" function in Organization administration > Number sequences > Generate.
NumberSeqDatatype
DataTypeId
(
,
)
x++
NumberSeqDatatype::loadModule();
https://<D365URL> /?cmp=<YourCompanyName>&mi=SysClassRunner&cls=<YourRunnableClassName>
Thank you for contributing to helping me find the solution. However, it seems that I have found the solution one way or another. After carefully examining André Arnaud's blog, I discovered that he calls the function responsible for loading the Number Sequence inside the Parameters table. So, I looked into Microsoft's VendParameters table and found that they call the Number Sequence loading function in case it is not loaded automatically. I followed the same steps, and the process was successful
I sincerely appreciate your help.
Ali AbdAlNasser
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
As AI tools become more common, we’re introducing a Responsible AI Use…
We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Martin Dráb 451 Most Valuable Professional
André Arnaud de Cal... 428 Super User 2025 Season 2
BillurSamdancioglu 239 Most Valuable Professional