Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

Customising the CMS /

automatically generated customer ID upon registration


Reply


2 Posts   950 Views

Avatar
janulka

Community Member, 80 Posts

21 January 2011 at 8:06am

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

Avatar
Nivanka

Community Member, 400 Posts

1 February 2011 at 2:43pm

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