+ Start a Discussion

I have to create a object for each user in my org.

In my org I have some users logged in as normal Salesforce User. The project is a typical e-commerce with a object called product , and, I want to create a ShoppingCart Object for each user (otherwise every user can view the records in the ShoppingCart Object). I don't know if is possibile, exist a method to automate the creation of that obj when a new User signs up in my org? Or I should to use session methods in my code? I hope my question is clear, thanks in advance
ShirishaShirisha (Salesforce Developers) 
Hi Tony,


I don't think this is possible as creating the Object is related to metadata and we can't create Objects using Apex code.However,we can create CustomMetadata records.

Can you please have a look at the below document and check if that works for you.


Kindly let me know if it helps you and close your query by marking it as solved so that it can help others in the future.

Warm Regards,
Shirisha Pathuri