Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

Help, as I'm lost!!

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi there,

Hope you are well!

I’m am just new to Dynamics CRM so please bear with my silly questions as I am trying to create a solution to replace our manual purchase ordering system so we have Dynamics 365 as part of our Microsoft license so I thought I’d give it a go!

I’ve created a couple of entities and fields all be it I’m not really sure if I am selecting the correct options but I am trying to create a field or an entity that gives me an auto generated number when I open the a form and that auto generated number will be our order number? Can anyone please advice me on how I would go about setting this up?

In addition, is there a way that I can change the currently primary key within our form so that that auto-generated field becomes our primary key?

Thanks in advance and I really hope someone can help me out and I'm struggling at the minute!

Cheers,

Bonemister

*This post is locked for comments

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Help, as I'm lost!!

    Hi folks,

    Thank you very much to everyone who kindly replied to my post!  

    Goodness, I wasn’t expecting that creating an auto number within a form would be so difficult.  As our CRM is a production system, I would probably need to put the XrmToolBox Plugin install through our change control board in case anything goes wrong.  The code method – where do I start!!!!  Ok, I have created a new entity called IPA, so where abouts do I try and enter that code to create the auto number field so it will appear on the form for me?  I don’t have Visual Studio installed on my machine as I am far from a coder so I am hoping that there is somewhere within the CRM that I can copy and paste / input the provided code within the customisations area so it will then create my new field, is that possible or have I got the wrong end of the stick?!

    Mohammed, thanks for letting me know about the alternate key option, I created a new field within my entity called IPA Number to test this out and get familiar with this but when I expand out my IPA entity and click on Keys it says no key records are available in this view, which I would have expected.  I then clicked on New and it brings up a Key: New window but I can’t see the field listed that I just created within my IPA entity – have you any idea why my new field isn't listed and how do I go about seeing it in that list so I can select it as my alternate key?

    Can I ask another question please as I think it is a must before I go about making any changes to what I have already!  I’m looking to take a copy of my solution so I went into customisations and clicked on Solutions then selected my solution and clicked Clone Solution.  It brought up a screen that allowed me to give the cloned solution a new name and it had a higher version number which I think is good and I think that is my solution cloned! My question is if I muck up in that cloned version of my solution, how to I revert it back to a previous version number of the solution before I had made any changed?

    Cheers,

    Bonemister

  • Verified answer
    PranavShroti Profile Picture
    PranavShroti 4,510 on at
    RE: Help, as I'm lost!!

    Hi , enough have been said already, just adding my two cents

    Found a very good article on this topic.

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

    good example with code:

    community.dynamics.com/.../the-new-auto-number-feature-in-dynamics-365

    Regards,

    Pranav

    If found useful, please mark the answer as verified

  • Verified answer
    Nithya Gopinath Profile Picture
    Nithya Gopinath 17,074 on at
    RE: Help, as I'm lost!!

    Hi Bonemister,

    You can't create your own primary key of the entity. By default, Dynamics CRM creates a field named entityLogicalNameId which is set as the Primary Key (a GUID value).

    But you can create an auto-number attribute for the order number and define your own Unique Key (which can be a single field or combination of fields) using the Alternate Key Mechanism.

    See: www.cloudfronts.com/define-alternate-keys-for-an-entity

    For creating auto-number fields using XrmToolBox or via code, you can refer the links below.

    http://anm.xrmtoolbox.com/

    docs.microsoft.com/.../create-auto-number-attributes

    Hope this helps.

  • Verified answer
    Hameed Hussain Profile Picture
    Hameed Hussain 250 on at
    RE: Help, as I'm lost!!

    Welcome to the Dynamics Community, hope you'll enjoy using the dynamics 365 product.

    Yes, there is a auto number that you can generate in Dynamics 365 v9.0. Please refer to the article. You should have a little knowledge about the XrmlToolBox.

    There is no need to change the primary as the entityid (guid) will be the default primary key for the entity. However you can add your auto generated number as an alternate key.  This alternate key can be used to identify your order records in place of the default primary key.

    You can find this under Customizations->Entities->your entity-> Keys

    3323.Keys.JPG

    If you find this answer useful, please mark it as a "suggested answer".

  • Verified answer
    Akanksha Ranjan Profile Picture
    Akanksha Ranjan 460 on at
    RE: Help, as I'm lost!!

    Hi

    Please follow the bellow link.

    https://toplearningsolution.blogspot.com/2018/06/add-auto-number-attribute-using.html

    Hope this will help you.

    Thanks

    PS: Please make answer as verified if found helpful.

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,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,235 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans