Customer Engagement & Dynamics CRM Forum

Expand all | Collapse all

Using auto Generated #'s in a field using XRMToolBox

  • 1.  Using auto Generated #'s in a field using XRMToolBox

    TOP CONTRIBUTOR
    Posted 19 days ago
    Has anyone used XRM ToolBox to create an auto generated number to populate on a certain field inside of a form? I have a request for a very specific format (ex: XYZ-10000) for each Case number that is created. I was told XRM Toolbox might have something to help assist me?



    ------------------------------
    Heather L
    ------------------------------


  • 2.  RE: Using auto Generated #'s in a field using XRMToolBox

    TOP CONTRIBUTOR
    Posted 19 days ago
    @Heather Laughlin - Have you looked into creating a custom field for the Case Number? You can use the new Auto Number field in the Common Data Service that should provide the format you need. Here is a link: https://docs.microsoft.com/en-us/powerapps/maker/common-data-service/autonumber-fields ​

    ------------------------------
    Aaron Back, MCSE
    Sr. Microsoft Dynamics 365 Consultant
    ACE Microtechnology
    _______________________________________
    CRMUG Board Member
    CRMUG Chapter Leader - Cincinnati, Ohio
    ------------------------------



  • 3.  RE: Using auto Generated #'s in a field using XRMToolBox

    TOP CONTRIBUTOR
    Posted 19 days ago
    Thanks! So the String Prefixed option would allow me to create my XYZ- 10000 to start the auto format with this specific number? I did already create fields on the form but I can probably just remove the initial case field and change name and try this method.
    thank you!

    ------------------------------
    Heather L
    ------------------------------



  • 4.  RE: Using auto Generated #'s in a field using XRMToolBox

    GOLD CONTRIBUTOR
    Posted 19 days ago
    Hi Heather, I believe this is the tool you were looking for: https://jonasr.app/2017/10/anm/

    Yes, you can define your own prefix, your start value and the number format.

    ------------------------------
    Sissy Bottcher
    Business Process Innovation Specialist
    Dynamics 365 for Sales Enterprise (Online v.9)
    San Diego CA
    ------------------------------



  • 5.  RE: Using auto Generated #'s in a field using XRMToolBox

    MICROSOFT MVP
    Posted 19 days ago
    Heather, if you have any questions around the tool (Auto Number Manager for XrmToolBox) don't hesitate to reach out! :)

    Best,
    Jonas

    ------------------------------
    Jonas Rapp
    MVP
    Sweden
    ------------------------------



  • 6.  RE: Using auto Generated #'s in a field using XRMToolBox

    GOLD CONTRIBUTOR
    Posted 17 days ago
    Yes, we use the Auto Number Manager through XrmToolBox and have placed a unique ID on several entities (i.e Opportunity ID = OPP00345).  This easily allows users to reference the ID for a specific record instead of the name, which isn't explicitly unique.  The one piece of advice is we have had to hide this field until after the record is created as we have found cases where the user can populate this before save.

    ------------------------------
    Shawn Hickey
    Burns & McDonnell
    Kansas City MO
    ------------------------------



  • 7.  RE: Using auto Generated #'s in a field using XRMToolBox

    TOP CONTRIBUTOR
    Posted 6 days ago
    So, I'm a bit confused on how to use this app in XRM toolbox.
    I created a field called Project so the auto generated project #s can go there. but I don't know if I am doing any of this correctly.
    Basically, I created an extension (with account info for one of our companies that doesn't want to use the generalized CRM to house everything) so there is account general info tab, opportunities, contracts, and a project sub grid.
    But when I select my default solution and find the entity I don't know how to go about customizing the auto generated # I need.
    they want the format to be GHM-110000, with the number starting at 10000. So... where does that go? Do I just highlight the Project display name on the left and fill in the right side or do I need to create a new attribute?


    ​​I'm learning how to do all of this as I go. I appreciate any feedback or advice!

    ------------------------------
    Heather L
    ------------------------------



  • 8.  RE: Using auto Generated #'s in a field using XRMToolBox

    MICROSOFT MVP
    Posted 6 days ago
    Hi Heather

    The Number Format you want to add for this behavior is "GHM-{SEQNUM:6}" (without the quotes). The 6 indicates how many figures the numbered part should be.
    The number format is part of the metadata, and included when you transport the solution from DEV to TEST and Production.
    To set the starting number you put that value (110000) in the Seed field. Note that the seed is not part of the metadata transfered with solutions, so you have to set this seed in each of the downstream environments you import the solution to.
    You can read more about Auto Numbering in the articles listed here: https://jonasr.app/tag/anm/

    ------------------------------
    Jonas Rapp
    MVP
    Sweden
    ------------------------------



If you've found this thread useful, dive deeper into User Group community content by role