Is it possible to create auto generated Id's in database?

I have created a customer table with various fields, now i have a field name customer_id which i want to auto generate once a user insert a new record.

Please suggest…

1 Like

Hey Rohit,
It’s not possible to generate IDs in the database. Instead, you can write a cloud function to generate IDs and store it in a variable, which you can use later to push into the database.

Okay Thanks Pratik

Cloud function will work i think, Let me try that.

1 Like

Can you please share me that function. I’m also working on the same

hi pratik,
do you have any function for this?