Hello,
I am trying to create a sequence of numbers. I am performing the steps according to: https://dynamics365musings.com/develop-a-d365-number-sequence/
After running the code, the sequence does not appear in the Number Sequences section in CustParameters. Am I doing something wrong?
Thanks.
class:
class AccountNumberGlobal extends NumberSeqModuleCustomer { public void loadModule() { NumberSeqDatatype datatype = NumberSeqDatatype::construct(); datatype.parmDatatypeId(extendedTypeNum(AccountGlobalId)); datatype.parmReferenceHelp("Global account number"); datatype.parmWizardIsContinuous(false); datatype.parmWizardIsManual(NoYes::No); datatype.parmWizardIsChangeDownAllowed(NoYes::Yes); datatype.parmWizardIsChangeUpAllowed(NoYes::Yes); datatype.parmWizardHighest(999999); datatype.parmSortField(60); this.create(datatype); } }
job:
class testclass { public static void main(Args _args) { AccountNumberGlobal ang = new AccountNumberGlobal(); ang.loadModule(); } }
Hi Shooowtek,
You can read my blog which explains what to do if the number sequence is not appearing on the number sequence tab in parameter forms.
What to do when new number sequence references on parameter forms are missing? - Dynamicspedia
I compare the code with the standard one. You seems to be missing one more line. Try adding that and check.
Thanks,
Girish S.
[/quote]still not working..
I compare the code with the standard one. You seems to be missing one more line. Try adding that and check.
datatype.addParameterType(NumberSeqParameterType::DataArea, true, false);
Thanks,
Girish S.
Have you checked the number sequence form ?
Does the custom number sequence generating?
Navigate to organization administration >>Number Sequence >> See whether custom number sequence is generated.
Try running the runnable class again and add the debugger in load Module method of your custom number sequence class and see whether debugger is hitting.
Thanks,
Girish S.
[/quote]After running the debugger, I can see that 'datatype' is 'no data selected'....
Try rename the method to loadModule_Extension - Update the method name in runnable class and rerun them again.
Thanks,
Girish S.
Hi Shooowtek,
On the number sequence wizard, did you see your new number sequence info log appear before you clicked the finish button?
You might want to confirm that, you fully build your custom model, then run the job again, and regenerate.
[/quote]Hello Komi Siabi,
1. No, I can't see my new number sequence.
2. Yes, my model has been fully built.
Where should the sequence be visible first - in the wizard or in the list in CustParamters?
Hi Shooowtek,
On the number sequence wizard, did you see your new number sequence info log appear before you clicked the finish button?
You might want to confirm that, you fully build your custom model, then run the job again, and regenerate.
Have you checked the number sequence form ?
Does the custom number sequence generating?
Navigate to organization administration >>Number Sequence >> See whether custom number sequence is generated.
Try running the runnable class again and add the debugger in load Module method of your custom number sequence class and see whether debugger is hitting.
Thanks,
Girish S.
Hello,
Yes. I generated, I still can't see the sequence in the list..
Is there anything else I should do?
Hi Shooowtek,
After running the class have you generated the number sequence under Organization administration >> Number Sequence >> Generate.
Thanks,
Girish S.
André Arnaud de Cal...
291,969
Super User 2025 Season 1
Martin Dráb
230,842
Most Valuable Professional
nmaenpaa
101,156