web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Opportunity Name: custom name

(0) ShareShare
ReportReport
Posted on by 125

Hello, 

Is there away to have the name of an opportunity automatically filled out when creating a new opportunity? I have not found a way to fulfill this using our requirements or out of the box methods. Our current format for the opportunity name is: 18-0524-07 and that indicates year-monthDay-number of opportunity created today. 

Can this be done Out of the box? if not what would be the JaveScript code? 

Thank you, 

Joseph

*This post is locked for comments

I have the same question (0)
  • Verified answer
    Shidin Haridas Profile Picture
    3,497 on at
    RE: Opportunity Name: custom name

    Solution 1:

    Use the Auto-number manager tool from the XRM Toolbox and create a new attribute as show below:

    70678.Capture.PNG

    use auto-number format as {DATETIMEUTC:yy-MMdd}-{SEQNUM:2}

    70678.Capture.PNG

    If you want to have the same name for the Opportunity record, then you need to write a plugin in the pre-operation which would copy this value into the name field.

    Solution 2:

    Create your own plugin logic to do this.

    The main challenge with your approach is that the last number has to be incremental. So, whether through javascript or plugin, you always need to retrieve what was the value of the last created Opportunity and increment it by 1.

    Solution 1 is a simpler approach with lesser processing.

  • Community Member Profile Picture
    on at
    RE: Opportunity Name: custom name

    Can't think of a script to write for it now, i will let me developer have a look at this.

    University assignments

    US- Prime Assignment

  • Community Member Profile Picture
    on at
    RE: Opportunity Name: custom name

    NJMCDirect is a ticket payment portal who overruling the traffic rules can pay fine or penalty through online. Even though you do it accidentally, you will be given a ticket for the traffic violation i.e. you need to pay the fine.

    njmcdirect   |
    njcourts online

  • Suggested answer
    Drew Poggemann Profile Picture
    4 on at
    RE: Opportunity Name: custom name

    Hi Joseph,

    Please check out the following:  community.dynamics.com/.../d365-v9-0-a-feature-a-day-auto-numbering-in-v9-0

    This article shows an example of how to do natively with custom code and it also some common solutions you can utilize to accomplish.

    Hope this helps.

  • Community Member Profile Picture
    on at
    RE: Opportunity Name: custom name

    I found all the information mentioned really interesting and justifying the topic of the post. Thank you so much for the great reply <a href="www.peryourhealth.org/&quot;>peryourhealth.com</a

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
Community Member Profile Picture

Community Member 2

#1
UllrSki Profile Picture

UllrSki 2

#3
SC-08081331-0 Profile Picture

SC-08081331-0 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans