Unable to create Number sequences.

This question has suggested answer(s)

Hi
When trying to create a number sequence we are getting the following error:
We have referred to this link to follow these steps:

http://dynamics-ax-dev.blogspot.in/2010/04/creating-new-number-sequence-for.html

Here are the steps:

1: Created a new edt called edt_complainid

2: In this class (NumberSeqReference_Customer) we have added following code:

    numRef.dataTypeId = typeId2ExtendedTypeId(typeid(edt_ComplaintId)); numRef.referenceHelp = "Unique key for the Complaint Report"; numRef.wizardContinuous = true;
    numRef.wizardManual = NoYes::No;
    numRef.wizardAllowChangeDown = NoYes::No;
    numRef.wizardAllowChangeUp = NoYes::No;
    numRef.wizardHighest = 999999;
    this.create(numRef);
   
    3: Tried accessing:

    Basic > Setup > Number sequences > Number sequences > Wizard
   
    We are getting this error message:
   
    Error    Message (02:41:00 am)    Error executing code: NumberSeqReference (object) has no valid runable code in method 'moduleList'.

 

(S)\Classes\NumberSeqReference\moduleList
(S)\Classes\NumberSeqReference\loadAll - line 7
(C)\Data Dictionary\Tables\TmpNumberSeqCreate\Methods\buildWizardList - line 10
(C)\Forms\NumberSequenceWizard\Data Sources\tmpNumberSeqCreate\Methods\init - line 5

 

Any help will be appreciated.

Thanks

N

All Replies
  • The error you have mentioned in step 3 has nothing to do with steps 1 and 2.

    Compile your application and then try to run the wizard.

    Thanks,

    Rachit Garg

  • Hi Rachit,

    I have tried it again and here is the error message i see in the infolog:

    Error executing code: NumberSeqReference (object) has no valid runable code in method 'moduleList'.

    

    (S)\Classes\NumberSeqReference\moduleList

    (S)\Classes\NumberSeqReference\loadAll - line 7

    (C)\Data Dictionary\Tables\TmpNumberSeqCreate\Methods\buildWizardList - line 10

    (C)\Forms\NumberSequenceWizard\Data Sources\tmpNumberSeqCreate\Methods\init - line 5

    I have put a breakpoint in the first line in the method of the class NumberSequenceReference

    static public void loadAll()
    {
        container   moduleList;
        int         i;
        ;

        moduleList = NumberSeqReference::moduleList();

    At this line it throws an exception and also tried putting a breakpoint in modulelist first line but noticed that it would not even hit that and an exception is thrown before this.

    Please let me know if you have any suggestions.

    Thanks

    N

  • So, I just read the blog post.   wheeeewww.. I'm glad that I wasn't the instructor who taught Development IV and left someone confused (though I really like his blog post).

    The message indicates that your number sequence is not loading in your module. It sounds like you just need to load the Number Sequence information inside of the module.  Easiest way to do that is to create a job in the AOT that does it if you are using Dynamics AX 2012 (but your code in in 2009) or to just restart the AOS if you are using 2009.  

    Independent, Freelance Consultant and Dynamics Development Instructor

    http://www.instructorbrandon.com

    http://www.youtube.com/user/BrandonAhmad