Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

Autonumber Using Business Unit as Prefix

(0) ShareShare
ReportReport
Posted on by 1,779

As subject... Is there any autonumber solution that will allow me to prefix the numeric ID with the business unit ID?

*This post is locked for comments

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Autonumber Using Business Unit as Prefix

    With a bit of Javascript you can achieve what you need by using the "HN Identifier Generator" (https://github.com/hncrm/HNIdentifierGenerator) with the following steps

    1. Embed the "hn_/scripts/Identitifier.js" to the Form Library
    2. Create a your own Form Library to do the following
      1. Call the "var id = hn_GetGeneratedId('NAME of IDENTIFIER record');
      2. Obtain the BU name.  Refer to http://microsoftcrmtechie.blogspot.com.au/2016/03/get-business-unit-id-for-user-crm.html.  You need to add the BusinessName to the select query.
      3. Update the Form attribute to concatenate value of both BU Name and id

    Hope that helps

  • Suggested answer
    ashlega Profile Picture
    ashlega 34,475 on at
    RE: Autonumber Using Business Unit as Prefix

    I think it might be easier to just create a simple plugin (maybe on post-create) which will add business unit prefix to the "name" field of the record. Just make sure it runs AFTER the original auto-numbering plugin, which will usually be the case if you put it in "post-create" (and it does not matter which auto-numbering solution you'd be using).

  • Suggested answer
    RE: Autonumber Using Business Unit as Prefix

    Thanks for the details, You can auto-number your custom entities but with little customization and configuration.

    Check this post! let me know if you need any help.

    https://www.encorebusiness.com/blog/dynamics-crm-auto-number-entities/

    Regards,

    Preshma

  • MDS Profile Picture
    MDS 1,779 on at
    RE: Autonumber Using Business Unit as Prefix

    Hi,

    Custom Entity: Job

    Business Unit: PLG

    Create new Job and the Job Name would be PLG001 if the Job is created by a user in the PLG Business Unit. If they belong to the ABC Business Unit, the Job Name would be ABC001.

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Autonumber Using Business Unit as Prefix

    Can you be explicit about what you want ? Kindly describe what you working on and what you like to achieve .

    E.g : I like to Add the auto number generated from task with business unit ID of creator as subject name

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Autonumber Using Business Unit as Prefix

    Can you be explicit about what you want ? Kindly describe what you working on and what you like to achieve .

    E.g : I live to Add the auto number generated from task with business unit ID of creator as subject name

  • Suggested answer
    PranavShroti Profile Picture
    PranavShroti 4,510 on at
    RE: Autonumber Using Business Unit as Prefix

    this being a very specific requirement, I believe you need to write your own auto number logic for this.

    If you really wana identify, crm does stores BUid with records. You can check in CRM DB.

    Regards,

    Pranav  

  • RE: Autonumber Using Business Unit as Prefix

    Can you be more specific with an example?

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

Congratulations 2024 Spotlight Honorees

Kudos to all of our 2024 community stars! 🎉

Meet the Top 10 leaders for December

Congratulations to our December super stars! 🥳

Start Your Super User Journey

Join the ranks of our community heros! 🦹

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,458 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans