Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Business Central forum

Can I use Number series in my table created in Extension of Business Central?

(0) ShareShare
ReportReport
Posted on by
Can I use Number series in my table created in Extension of Business Central?
  • AJAnsari Profile Picture
    5,754 on at
    RE: Can I use Number series in my table created in Extension of Business Central?

    My pleasure! Good luck.

  • Community Member Profile Picture
    on at
    RE: Can I use Number series in my table created in Extension of Business Central?

    Thank you so much Ansari

  • Verified answer
    AJAnsari Profile Picture
    5,754 on at
    RE: Can I use Number series in my table created in Extension of Business Central?

    Hi Bhawan,

    If your Page Type is Document, then you should be able to use a subform page for lines like you do in NAV.

    And yes, to use the NAV Development Environment, you can create and use the Sandbox Container environment. It can be on Azure, or on-prem on your machine with Docker.

    Here, you will have access to the C/SIDE Development environment, but keep in mind, that you still have to follow these guidelines:

    * Make sure you are not modifying any base objects

    * Use Events and Extensions to extend base objects if needed

    * Follow the Object Range rules (if making a custom table, even the field IDs have to be in the object range; cannot have field ID 1, 2, etc., unless Microsoft has issued you a reserved object range for AppSource, or you have an ISV object range)

    * After you make your solution, you will need to export all new objects as .TXT in new format, get deltas (there is a script for it), and then use the Txt2AL scripts to convert them to AL, and then use Visual Studio to debug/compile and get your .app

    You can find all of these rules in the Mirosoft Docs for AL under the Business Central docs:

    docs.microsoft.com/.../devenv-dev-overview

    I hope this helps. If my response has answered your question, please verify by clicking Yes next to "Did this answer your question?"

  • Community Member Profile Picture
    on at
    RE: Can I use Number series in my table created in Extension of Business Central?

    Thanks a lot  Ansari,

    That's working fine now. I got one more issue. I'm creating something same functionality as Sales Invoice. But not able to put data in grid as lines(related to that particular Invoice header). Any suggestions how to work with grids.

    And is  there any development environment for Business central (Online) like Nav2018?

  • Suggested answer
    AJAnsari Profile Picture
    5,754 on at
    RE: Can I use Number series in my table created in Extension of Business Central?

    Hi Bhawan,

    In Visual Studio Code, does your folder also contain the .al file that extends the Sales & Receivables Table (and for usefulness, the page) with this field? Or if that is does in another extension, have you defined it as a dependency? It looks like that may be reason why you cannot see the WebUser Nos. field here.

    I hope this helps. If my response has answered your question, please verify by clicking Yes next to "Did this answer your question?"

  • Community Member Profile Picture
    on at
    RE: Can I use Number series in my table created in Extension of Business Central?

    7026.Capture.PNG

    That's great information. Here is the screen shot of the table "sales & receivables setup" and I want to use "WebUser Nos." field in my other table. 

    and my here is the code where I want to use this field.

            field(1; "No."; Code[20])
            {

                trigger OnValidate()
                var
                    SalesSetup: Record "Sales & Receivables Setup";
                    NoSeriesMgt: Codeunit NoSeriesManagement;
                BEGIN
                    IF "No." <> xRec."No." THEN BEGIN
    SalesSetup.GET;
    NoSeriesMgt.TestManual(SalesSetup.<<(Here should be "WebUser Nos.")>>);
    "No. Series" := '';

                    END;
                end;
            }
    This field "WebUser Nos. " is not coming here and even not appearing in the definition of table 311. Do you have any idea, why it's not coming here.
  • Suggested answer
    AJAnsari Profile Picture
    5,754 on at
    RE: Can I use Number series in my table created in Extension of Business Central?

    Yes, if you use the Sandbox Container option, then you can use the NAV Development Environment.

    Be sure you are still following the same rules as in AL (no modifying standard objects, etc.)

    When done, you need to convert it to AL using the Text2AL tool (and to do that, you need to export the objects in new format and get deltas).

    You can find the instructions in the AL documentation on Microsoft Docs for Business Central. I’m on my phone so I don’t have the links handy, but if you can’t find them, let me know and I will send you the links later when I’m by my laptop. I was able to follow the instructions and do it.

    Also, there is a function in the navcontainerhelper in the Sandbox Container to help get the deltas so you can quickly jump to the Text2AL steps.

    I hope it helps! Please verify by clicking Yes, if it does.

  • Community Member Profile Picture
    on at
    RE: Can I use Number series in my table created in Extension of Business Central?

    Hi Ansari Thanks for your suggestion. I'm doing exactly same way but not able to get the newly added field(let's say 'Webusers Nos.') of "Sales & Receivables Setup" table inside my visual code. I have one more question can I use NAV Development Environment with Dynamics Business Central (Online)?

  • Suggested answer
    AJAnsari Profile Picture
    5,754 on at
    RE: Can I use Number series in my table created in Extension of Business Central?

    Yes, you can. In your code, you will have call the No. Series Management Codeunit. If you're not sure, review the code in an object like the Sales Header table, or the Customer table.

    As a good practice, you will also want to add a field in a Setup table (by extending an existing Setup table, or making your own Setup table) where the user can define the No. Series they want to use for your table.

    Note: To review the code in an existing object as I have suggested, you will need to have a Sandbox Container and launch the NAV Development Environment and use the Object Designer to design the desired object. I doubt you will be able to do this with an Online Sandbox + Visual Studio alone.

    I hope this helps. If my response has answered your question, please verify by clicking Yes next to "Did this answer your question?"

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

November Spotlight Star - Khushbu Rajvi

Congratulations to a top community star!

Forum Structure Changes Coming on 11/8!

In our never-ending quest to help the Dynamics 365 Community members get answers faster …

Dynamics 365 Community Platform update – Oct 28

Welcome to the next edition of the Community Platform Update. This is a status …

Leaderboard > Business Central forum

Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans