Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

Auto generation across Lead and Opportunity Entity

Posted on by Microsoft Employee

How to achieve the below scenario auto generation across two entities ?

Step1: When a lead is created in Lead entity, the ID should be PRJ-2018-001, after Qualify the ID to be carried forward to Opportunity entity.

Step2: When an opportunity is created in Opportunity, the ID should be PRJ-2018-002 (running number)

Step3:When a lead is created in Lead entity, the ID should be PRJ-2018-003 (running number), after Qualify the ID to be carried forward to Opportunity entity

Step4:When an opportunity is created in Opportunity, the ID should be PRJ-2018-002 (running number)

*This post is locked for comments

  • Suggested answer
    RaviKashyap Profile Picture
    RaviKashyap 55,410 on at
    RE: Auto generation across Lead and Opportunity Entity

    Hi,

    You can avoid this as follow-

    1) Add a field mapping for your auto number field from lead to opportunity - ledgeviewpartners.com/.../mapping-lead-data-new-opportunities-dynamics-365crm

    2) In your plugin code, before generating the number, check if the auto number for opportunity is already present or not. If it is then do not generate the number.

    This way, you will achieve your requirement.

    Hope this helps.

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Auto generation across Lead and Opportunity Entity

    Hi Ravi,

    Yes, it can be achieved using custom plugin only.

    My question is here...if we Qualify Lead to Opportunity then new number should not to be generated, it has to carry forward same Lead ID to Opportunity ( above Step 1 & Step 3). is it possible ?

  • Suggested answer
    RaviKashyap Profile Picture
    RaviKashyap 55,410 on at
    RE: Auto generation across Lead and Opportunity Entity

    Hi SAPK,

    There isn't any standard out of box implementation to achieve your requirement. You need to create your own custom plugin which retrieves the running number from a common place (may be a separate entity) and then create the auto number for create lead, opportunity.

    You could refer the sample plugin/code available in coldeplex and build your own. archive.codeplex.com

    Hope this helps.

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Auto generation across Lead and Opportunity Entity

    Thanks. If we Qualify from Lead to Opportunity, does it create a new Project ID?

  • Verified answer
    Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Auto generation across Lead and Opportunity Entity

    You can create a plugin to auto generate incremental number and register it on lead and opportunity entity.  This plugin should update same entity record of autonumber configuration.  Please look at below screen capture for sample autonumber configuration entity record.  Each time a lead or opportunity is created

    the current position filed is incremented by one which is allocated to new record. You can pad this with year digits and zeros to current position and make the desired pattern.  Hope it helps!!

    78532.Capture.JPG

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Auto generation across Lead and Opportunity Entity

    Step4:When an opportunity is created in Opportunity, the ID should be PRJ-2018-004 (running number) (not PRJ-2018-002)

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,188 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans