Jump to:

5514 Posts in 1733 Topics by 1219 members

Customising the CMS

SilverStripe Forums » Customising the CMS » automatically generated customer ID upon registration

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1
Go to End
Author Topic: 878 Views
  • janulka
    Avatar
    Community Member
    80 Posts

    automatically generated customer ID upon registration Link to this post

    Hello,

    I have custom member class with extra fields and nice working registration forms - one for users and another for customers (adding users to group "Customers")

    I would like to add automatically generated customer ID to each customer (auto increment, working like an ID, but since there are other users which are NOT customers, these should not get this unique customer ID)

    Is this possible to do?

    Thanks in advance

  • Nivanka
    Avatar
    Community Member
    395 Posts

    Re: automatically generated customer ID upon registration Link to this post

    whats your database? in MYSQL obviously you cant have two auto increment fields for the same table.

    but you will be able to run some formula to get this done using the onBeforeWrite or onAfterWrite functions of dataobjects, and with the help of DataObjectDecorator

    878 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.