Portal Engine Questions on portal engine and web parts.
Version 7.x > Portal Engine > Delete Test Orders, Addresses, Users, Customers, in Bulk View modes: 
User avatar
Member
Member
RobJeremy - 1/27/2014 11:10:32 PM
   
Delete Test Orders, Addresses, Users, Customers, in Bulk
Hello everyone.

First I'd like to say thanks to Kentico for making such a reliable software. I am amazed at all of the functionality it has to offer.

I have been building an ecommerce website and have been doing a lot of testing with users, customers, orders, addresses, etc. The database has tons of test records in it (300+) and I would like to remove it all in bulk.

When I try to delete records from the orders and address table manually I get SQL foreign key constraint errors. Should I set them to cascade? I primarily want to just wipe these records out, and am curious to know what the Kentico way of accomplishing this would be.

The only other thoughts I had were using the API based off this example
http://devnet.kentico.com/docs/devguide/index.html?membership_api_examples_managing_users.htm

Any advice or help would be greatly appreciated. Thanks

User avatar
Kentico Consulting
Kentico Consulting
Kentico_RichardS - 1/28/2014 3:04:47 AM
   
RE:Delete Test Orders, Addresses, Users, Customers, in Bulk
Hi,

Thank you for your message.

We are glad you like our software. To answer you question - you are quite correct about the article you sent with API examples. Every object in Kentico can be handled with the API we provide. You should almost never (unless you really know what you are doing) modify the Database directly. There many dependencies which you may not even know about between objects.

If yu would like to remove e.g. users, check out: http://devnet.kentico.com/docs/devguide/membership_api_examples_managing_users.htm

You may find the objects and the methos in our API reference here -> http://devnet.kentico.com/docs/kenticocms_api.zip

Let me know if you have any other questions.

Kind regards,
Richard Sustek

User avatar
Member
Member
RobJeremy - 1/28/2014 9:38:52 AM
   
RE:Delete Test Orders, Addresses, Users, Customers, in Bulk
Hi Richard,

Thank you for your detailed response. I appreciate your help, and you answered my question.

Thanks,
Rob