0

I'm building a custom addon for a SP 2010 instance. I've been able to get a Visual Web Part in visual studio deployed to my SP instance and debug it. As far as I can tell I have all the normal capabilities that I'd have in as ASP.NET project. Here is my question:

What is the proper way to create my own custom tables to store data specific to my solution? Does SP provide a standardized way to accomplish this? I don't need in-depth details but I'm looking more for best practices to understand how this is done.

Also, I've been able to create my own lists in SP that I can access via code. I've been able to pull them out and see their names. They don't seem to have a corresponding seed value or ID. Again, what is the best practice for referencing these lists? It seems that a user could delete a list item and orphan a ton of records.

Just looking for a push in the right direction.

  • It looks like you have two different questions. Could you move your third paragraph into a new question? Right now it's overly broad and is likely to be closed. – Robert Kaucher Mar 28 '14 at 19:42
0

See, SP provides List that can be used to store data.. You can retrieve them using Object Model.. SPList.GetItems(SPQuery) (this can be similar to writing SQL Queries).. You might need to learn a little bit of CAML, there are some tools available that prepare the CAML for you (U2U Caml Builder, others search for them)..

About people can delete List Items, that depends on the permissions they have on the list.. If you want users not to delete the List Items, simply go to List Settings -> List Permissions; Here you can manage the permissions for the List.. By default List will be inheriting permissions from the SP Website itself..

Now it depends on your requirements, maybe you want to give them Contribute (means add, update, delete items) permissions but you might need them only Read access on List.. So you need to Stop inheriting list permissions from Web.. and give custom Permissions on List..

There is another important part of SharePoint which is Document Libraries, since SharePoint can be used as a Document Management System as well.. You should learn about that too..

References:

Understanding Permission Levels in SharePoint

CAML Query Tools

SPList.GetItems with Example

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.