Skip to main content

Notifications

Microsoft Dynamics NAV (Archived)

number series

Posted on by 1,745

i want to generate number series using  different setup table

i have two table ,

table:product setup

field name:

Primary Key

Product Nos.

table:Product 

field name:

No.

Product Name.

Number series :97

butt when i try to run a page to generate number series 

it throw error:

The Product Setup  does not exist .identification field and values Primary Key="

*This post is locked for comments

  • Suggested answer
    Miguel Llorca Profile Picture
    Miguel Llorca User Group Leader on at
    RE: number series

    Hi Javed, you must set a primary key. I'm also with Jaideep.

    Let us know if you solve your issue.

    Regards,

  • mmv Profile Picture
    mmv 11,465 on at
    RE: number series

    Hi,

    I agree with Jaideep.  Please check his solution on this.

  • Jaideep Sengupta Profile Picture
    Jaideep Sengupta 430 on at
    RE: number series

    Hi

    If your product Setup table contains value of primary Key: 1 then you need to "Get" that value. But since it is a setup table it should be blank.

    The error is specifying that there is no primary key in the table where the value is "" which is causing the error.

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: number series

    I thinks you should add one more field "No. Series" to table:product setup

  • javedakhtar Profile Picture
    javedakhtar 1,745 on at
    RE: number series

    Hi Mahesh Sir

    I contain only one record ,i.e

    primary key         Product Nos

    1                            Product

  • mmv Profile Picture
    mmv 11,465 on at
    RE: number series

    Hi,

    Could you check whether your Product Setup contains any record?

  • javedakhtar Profile Picture
    javedakhtar 1,745 on at
    RE: number series

    i just kept in braces for your better understanding

    in actual code there is no braces

  • mmv Profile Picture
    mmv 11,465 on at
    RE: number series

    Hi,

    From the above code, it seems that everything is commented. Are you sure this is the code where you are getting the error?

  • javedakhtar Profile Picture
    javedakhtar 1,745 on at
    RE: number series

    OnInsert(){

    IF "No." = '' THEN BEGIN

     ProductSetup.GET;

     ProductSetup.TESTFIELD("Product Nos.");

     NoSeriesMgt.InitSeries(ProductSetup."Product Nos.",xRec."No. Series",0D,"No.","No. Series");

    END;

    }

    No. - OnValidate(){

    IF "No." <> xRec."No." THEN BEGIN

     ProductSetup.GET;

     NoSeriesMgt.TestManual(ProductSetup."Product Nos.");

     "No. Series" := '';

    END;

    }

    AssistEdit() : Boolean{

    ProductSetup.GET;

    ProductSetup.TESTFIELD("Product Nos.");

    IF NoSeriesMgt.SelectSeries(ProductSetup."Product Nos.",xRec."No. Series","No. Series") THEN BEGIN

     NoSeriesMgt.SetSeries("No.");

     EXIT(TRUE);

    END;

    }

    Product Page code:

    No. - OnAssistEdit(){

    IF AssistEdit THEN

     CurrPage.UPDATE;

    }

  • TharangaC Profile Picture
    TharangaC 23,116 on at
    RE: number series

    Did you found a solution?

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.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,240 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,149 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans