Generating Customer Number in VBA

Last post 10-21-2008 2:14 AM by Vaidy. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 10-17-2008 2:59 PM

    Generating Customer Number in VBA

    We just upgraded from 6 to 10 and I'm beginning to assess all the Modifier and VBA changes that need to be done in 10.

    As a business practice, we don't want the user to have to come up with the customer number.  So in 6.0 we have some VBA on the Customer Maintenance that has the user enter a new customer's name and then the VBA goes and grabs the largest customer number and increments it by 1.  Then it executes a SQL statement against RM00101 to add the new customer, filling in just the customer number and name.

     Is that still something valid that I can do in VBA with 10?

  • 10-18-2008 6:03 PM In reply to

    Re: Generating Customer Number in VBA

    This customisation is still valid in v10.0

    My only concern is that it is not multi-user friendly.  If two people go to add a customer at the same time they will be given the same number. 

    David Musgrave [MSFT]
    Escalation Engineer - Microsoft Dynamics GP
    Microsoft Dynamics Support - Asia Pacific

    Microsoft Dynamics (formerly Microsoft Business Solutions)
    http://www.microsoft.com/Dynamics

    mailto:David.Musgrave@online.microsoft.com
    http://blogs.msdn.com/DevelopingForDynamicsGP

    Any views contained within are my personal views and not necessarily Microsoft policy.
    This posting is provided "AS IS" with no warranties, and confers no rights. 

     

    Tags:
  • 10-20-2008 6:28 AM In reply to

    Re: Generating Customer Number in VBA

    That's been my concern as well; however, that's what the long-gone consultants put in place and I was handed to maintain.  It hasn't been an issue, though, in 6 years of using GP, as we generally only have one or two individuals permitted to add customers out of a total of maybe 8 or 10 users total.

    Is there anything you might recommend to improve it?  Have you seen any other organizations with a similar requirement to auto-gen the customer number?

  • 10-21-2008 2:14 AM In reply to

    • Vaidy
    • Top 50 Contributor
    • Joined on 06-10-2008
    • India
    • Posts 16

    Re: Generating Customer Number in VBA

    You can try doing what Standard GP does when it fetch PO Number or SOP Document Numers, though it would require a bit more work.

    Save the "Next Customer Number" in a Custom Table (or you can even check some of the RM Setup User-defined fields or some place where you can manage to find in GP itself).

    While entering a new Customer, fetch the value from this field and Increment it immediately. So even if multiple users try to create a Customer, the Increment will take care, though fractions of time does matter and sometimes you tend to get a clash, but that's rare.

    I guess, that's one option you can try out.

    Thanks
    Vaidy
    http://vmdyngp.blogspot.com

    Thanks
    Vaidy Mohan
    www.vaidy-dyngp.com
Page 1 of 1 (4 items)