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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Auto increment number

(0) ShareShare
ReportReport
Posted on by 395

Hi,

 I have a custom form within CRM 4.0 for guarentees, one of the fields being 'Guarentee No' (int).

How do i get it to auto increment everytime a new guarentee is created?

*This post is locked for comments

I have the same question (0)
  • Rick Rofe Profile Picture
    150 on at

    Hi

     There are a number of ways that you can get CRM to auto increment  an int attribte , the one that I like to use  is a CRM 4 plugin that allows you to incrementally number any entity in CRM. You can access the code from http://crmnumbering.codeplex.com/ . I have used this plug in with many projects and never had a problem. Good luck.

    Regards

     

    Rick Rofe

  • jc_gmk Profile Picture
    395 on at

    I haven't ever installed a plug-in, do you have any instructions how i install it? or possibly an alternative method for auto incrementing an attribute.

  • Rick Rofe Profile Picture
    150 on at

    To my knowledge there is no other way to get the auto number increment working except through coding. However, this is not as difficult as you may think.

    First, download the plug-in from http://crmnumbering.codeplex.com/releases/view/21489 when you extract the contents of the zip file you have four files:customizations.xml,

    Magnetism.Crm4.dll,

    microsoft.crm.sdk.dll and

    microsoft.crm.sdktypeproxy.dll.

    You can ignore the last two files. The customizations.xml file contains a number of customisations that need to be imported into your CRM installation. To import the customisation file select :Settings -> Customisation -> Import Customisations Browse to the location of the extracted customizations.xml file and select "Upload". Once the file is uploaded select "Import Selected Customizations". Next  create a new attribute on the entity you want to increment (Guarantee No) with the following settings:
    Display Name: this can be anything
    Type: int
    Name: anything you want, remember the name, you will need it later. (make sure you publish the new attribute on saving it).

    Now go into the Incremental Numbering section (assuming you've imported the customizations file and published), add a new entry :

    Entity Name: What ever the name of the Entity is (the Entity that contains the 'Guarantee No' attribute)Property Name: schema_name_from_above
    Current Position: 0 (recommended, but can be any number you want to start from)

    Save & Close

    You then need to register the plug-in, download the plug-in  registration tool from
    http://code.msdn.microsoft.com/crmplugin/Release/ProjectReleases.aspx?ReleaseId=2010

     

    Instructions on the registration tools use can be found here
    Register new assembly -> Register new step
    Message: Create
    Primary Entity: invoice
    Stage of Exec.: Pre
    Exec. Mode: Sync
    Triggering Pipeline: Parent

    Let me know if you have any trouble.

      Rick

  • Leon Tribe Profile Picture
    7,034 on at

    You can increment through workflow, which could work.

     Leon Tribe
    Want to hear me talk about all things CRM? Check out my blog
    http://leontribe.blogspot.com/ 
    or hear me tweet @leontribe

  • jc_gmk Profile Picture
    395 on at

    Thanks Rick,

     I've carried out all instructions you gave me but it doesn't seem to work, can you confirm the below details are alright:

    Register new assembly -> Register new step
    Message: Create
    Primary Entity: invoice
    Stage of Exec.: Pre
    Exec. Mode: Sync
    Triggering Pipeline: Parent

    Do i need to restart anything in order to apply these settings?

  • Rick Rofe Profile Picture
    150 on at

    Can you confirm that you first registered the assemby and then the Step?

     register new assembly -> then register new step

    To get the plugin to work you first need to Register the Assembly and then Register a step (in this case 'Create') from the registered assembly(Magnetism.Crm4).

    Also, are you sure that you published the customisations that were imported by the customisation.xml file?

    Let me know

     

    Regards

    Rick Rofe

     

     

  • jc_gmk Profile Picture
    395 on at

    Just to confirm the steps i have taken:

    first i uploaded the customisation and published it. I know it's published because i can enter the guarentees entity details in it. These are: Name: Guarentees, Entity Schema Name: new_guarantee and Field Schema Name: new_guaranteeno.

    Next i ran the plugin regestration tool and registered the Assembly "Magnetism.Crm4". I then created a step with the following details:

    Message: Create
    Primary Entity: new_guarentee
    Eventing stage: Pre Stage
    Exec: Sync
    Trig: Parent

    Do i add anything to the Unsecure or Secure configuration?

    Do i need to add an image?

  • Rick Rofe Profile Picture
    150 on at

     From, what you are saying, it seems you have correctly installed the plugin, it sounds like you may have a configuration issue.....

    Are you running CRM 4.0 Professional? How is your CRM Installation deployed? Is it on one Server?  When you say it 'does not appear to be working', is it doing nothing or are you getting an error message?

    Rick

     

  • jc_gmk Profile Picture
    395 on at

    I have the full version of CRM 4.0 installed.

    I have 2 servers, 1 which Microsoft Dynamics CRM and NAV are installed and the other server is a dedicated SQL server.

    I don't get any error messges, it just doesn't appear to do anything.

  • AllanConnolly Profile Picture
    65 on at

    Hi Rick

     

    Thanks for the instructions above you may have got me out of a hole! however when I create a new record for the entity that I want to have the number increment (new_refurbishments in this case) the position on the Incremental Numbering record changes however this number is not reflected on the field new_refurbishmentnumber (this is the field detailed in the Incremental Numbering Form)

    Do i need to use a workflow to populate this field with the number?

    Thanks

    Allan

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…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans