Object model scripts are scripts that access the SharePoint API directly. These scripts are typically written in Visual Studio and are run while on-server and are great to automate tasks or to complete operations that you can’t run using stsadm or the central admin console. The below demonstration shows hot to create a simple project that consumes the object model to modify the publishing polling interval.
Open Visual Studio 2005 or 2008 and create a new project.
Add a reference to the Microsoft.SharePoint.dll and, for the sake of this example Microsoft.SharePoint.Publishing.dll. Keep in mind this is a "partial" DLL so you’ll want to put most of the SharePoint DLLs that you download from your server into a folder such as Third Party. If your development environment has a SharePoint server running then simply reference the DLLs in C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\ISAPI , also note that the Publishing feature is not installed into the web server extensions folder, instead it resides in C:\Program Files\Microsoft Office Servers\12.0\Bin.
Enter code of Form1 and add the using statement for "Microsoft.SharePoint.Administration".
Build out your form or command line switches
Code up your action by using the config portion of the SharePoint object model as follows
Rating: 9.0/10 (2 votes cast)
Rating: -2 (from 2 votes)
Creating a SharePoint Object Model Script in Visual Studio, 9.0 out of 10 based on 2 ratings
Ulysses Ludwig is a SharePoint architect with over 16 years in the IT and computer industry. Ulysses' primary focus is SharePoint but he dabbles in the latest web technologies and likes to develop software in his spare time.
Sometimes InfoPath doesn’t allow you to rename your main data source so you are stuck with a name that doesn't necessarily match with the function of the form. This is very common for those of us that...
Problem You've developed a custom workflow using Windows Workflow foundation, Visual Studio, and a nice little product called InfoPath, however, when you test your workflow you get the error message "This...