Skip to main content

Notifications

Announcements

No record found.

Customer Service forum

Case Number based on business unit

Posted on by Microsoft Employee

Hi all!
I want to customize the case number attribute to an autoNumber which would change format based on the business unit it belongs.

For example: I have two BUs, the first one is called Sparks and the second is Peters&Peterson. These business units coexist in the same environment and both can issue cases, the conditions would be:

  • Sparks can see/edit his own cases, but not P&P's
  • P&P can see/edit his own cases, but not Sparks'
  • root BU can see/edit both
  • Sparks case number format would be something like SPR-{RANDSTRING:4}-{SEQNUM:4}
  • P&P case nuber format would be something like PTR-{RANDSTRING:4}-{SEQNUM:4}

Is there a way to do this so it programatically choses the case number format based on the Business Unit?

Categories:
  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Case Number based on business unit

    I know for sure it's not an out of the box feature and I'm on version 9.x. I expected it would need an autonumber and that it would increase regardless of business unit. Still, knowing that at least somebody else did it encourages me to try it. Nice trick by triggering it onSave, that was the piece that I was missing.
    I think I will try to make it pick the prefix onCreate.

    Thanks! :D

  • Verified answer
    Dynamics365 Rocker Profile Picture
    Dynamics365 Rocker 7,755 on at
    RE: Case Number based on business unit

    You have to create an auto number plugin, You can take help from below link:

    gceganesh.blogspot.com/.../auto-number-plugin.html

    You have to check business unit of case owner in plugin for adding SPR or PTR prefix.

  • Verified answer
    Alex Fun Wei Jie Profile Picture
    Alex Fun Wei Jie 33,626 on at
    RE: Case Number based on business unit

    Hi,

    which version are you using ?

    if you are using v9.0, you shall use system autonumbering entity.Refer to below blog, and if you are watching the video , move forward to 50 minutes.

    Use the first method and remember to get the user's business unit and apply the checking.

    community.dynamics.com/.../dynamics-365-v9-0-hidden-gems-1-autonumber

  • tarunnyc Profile Picture
    tarunnyc 65 on at
    RE: Case Number based on business unit

    I did one for my application similarly . but it will generate a string and keep on adding +1. i wrote some code as a plugin and firing it on save . i think in your case you need to check from which unit the case is created and generate case number accordingly . im pretty sure its not out of box feature 

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

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,214 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans