Generate No Series with Characters

tazzy30tazzy30 Member Posts: 52
Hello all,

I don’t know if it is possible but I have created a new table and entered the relevant code so that the ‘Vendor Sample No’ is generated automatically (using No Series). This works fine however I would like for this number to include the first 3 letters of the ‘Vendor name’, so when the ‘Vendor No’ is selected the ‘Vendor Sample No’ will be created using the first 3letters of the name and then the numbers following. Is this something that can be done when using No Series?

Thank you

Comments

  • modricmodric Member Posts: 42
    In standard no - you still can have leading letters in No series, but always the same.
    Modification can do it for you, of course.

    BTW, do you have taken into consideration, how this will affect the sorting order of your Vendors?
    If exactly this is what you want to achieve - then maybe use different key (Name, Search Name...)
    Modris Ivans
    MCP, Dynamics NAV - Application
  • tazzy30tazzy30 Member Posts: 52
    Thank you for your reply,
    This should have no relevance to the sorting of the Vendor as the table I have created is separate to the Vendor table, the Vendor No. field has a tablerelation to the Vendor tbl
  • modricmodric Member Posts: 42
    If this numbering is required in your custom table, and, as I understood from your post, records are added automatically (I suggest it`s triggered when a new Vendor is created) - why you don't add several lines of code which takes care of this N#? It's easier (and safer) than customizing original Nos system...

    A simple SELECT Max(Value(NumberField)) + 1 /absolutely generic code to illustrate the idea/ will do, but in multiuser environment there must be a table holding LastNumber.
    Modris Ivans
    MCP, Dynamics NAV - Application
Sign In or Register to comment.