sharepoint

How to programmatically check view permission to a url in SharePoint?

I am displaying a list of popular public bookmarks to the logged-in user. Some users dont have access to these bookmark-urls and I want to suppress the results so that only accessible urls are shown to the user. I tried to use the DoesUserHavePermissions method, but the problem is that I am not sure what object does the url points to (...

Sharepoint quiz

From Sharepoint newbee Hi, I want to create a quiz in Sharepoint and assign marks to the individual options (always 4) of each question. At the end the candidate should get the overall score. Is it possible in Sharepoint? I already have the questions ready and available in Sharepoint. All questions have only one correct answer. ...

Run SharePoint Timer jobs from PowerShell

We are currently moving from using stsadm to using PowerShell for our SharePoint install scripts. We have not been able to find an equivilent to this: stsadm -o -execadmsvcjobs We have tried putting in a pause, but it varies how long the pause needs to be. Is there an equivilent command in PowerShell, or could we run this command fr...

Best way to implement authentication and authorization for a sharepoint 2010 website.

Hi I come across different authentication methods in Sharepoint 2010. The sharepoint website we are develpoing as of now is Intranet. Later we are planning to move it to Internet(Public) site. What will be the best way to implement authentication and authorization for our website. If windows authentication(Classic mode authentication) i...

Search Results XML Data returns first line of text as the result title instead of the title field for some .doc files

Excuse the very long title, I was just trying to be descriptive :) I have a number of word documents stored in a document library in a document centre. For most of the documents when I search for a term, the content that's in the "Title" field is returned in the result's title node in the Search Result XML. However there are a number ...

What's a good way of branching specifications alongside code using TFS and Sharepoint?

We are a software product company and our product codebase naturally gets branched for different projects. We currently use TFS2008 configured to store documents in SharePoint 2007. Both of these will be updated to 2010 versions, starting with TFS. We'd like to branch - and not just version - our specifications so that any release from ...

Selecting rows with distinct column values using LINQ

I have a generic list of SharePoint list items (List employees) The SharePoint list contains the two columns, "Employee Name" and "Employee Designation" I want to get an object List which contains distinct "Employee Designation" column values. How do I do this using LINQ? This didnt work for me: var designations = from SPListItem e...

How to properly dispose of SP objects although not assigned?

If I assign SPContext.Current.Site.OpenWeb().Title to a string, do I need to dispose of it (if possible)? string title = SPContext.Current.Site.OpenWeb().Title; I'm still a little fuzzy on when to dispose of sp objects, so I always dispose of my SPWeb and SPSite objects... But, if I don't assign the statement above to an object first,...

Repeated execution of code activity in SharePoint workflow!?

Hi all, I have a custom workflow implementation what requires updation of an external DB. I created a simple workflow for text purpose and found a strange thing! my Db update/insert code is placed in a code activity of the workflow. it seems the code activity is executed multiple times when the workflow is invoked on a simple list item...

How determine which site template to use for different sharepoint 2010 versions?

I have 2 environments: Foundation 2010, SPS 2010 and 2 templates correspondingly. I consider that we can determine the VisibilityFeatureDependency parameter of <Configuration> section in webtemp*.xml in order to hide other templates except one that will be used. What feature (GUID) should be used in order to exactly specify what version...

Update a VisualStudio solution after "Import SharePoint Solution Package"

Hi, having created a VisualStudio project from an exported SharePoint solution (Import SharePoint Solution Package), how to keep Pages / Content types / Lists etc in sync when changing them on the SharePoint side via the web UI or SharePoint Designer? Thanks ...

Where to start learning SharePoint 2010?

I recently started at a new job where I'll be working with Sharepoint 2010 to set up (or actually upgrade) an intranet. Unfortunately, I have no experience with SP2010, and the last time I touched SP2007 (or a virtual server for that matter) was four years ago. I'll be attending a course soon, but until then I have to make myself useful...

Using Resources in NavBarLink Url property

Hi Everybody, I'm creating a site definition for sharepoint 2010. I have a problem with the Url Property of the NavBarLink. <NavBar Name="$Resources:SOR,RootSiteDef_Nav_Report;" Url="$Resources:core,lists_Folder;/$Resources:SOR,RootSiteDef_Nav_Report;/" ID="1006"> <NavBarLink Name="$Resources:SOR,RootSiteDef_Nav_Report_ByOwnerAn...

Adding variables to a Data View's RootFolder QueryStringParameter (Sharepoint WSS3.0)

I currently have pages on my site with several xsl dataview webparts. Each dataview webpart shows the contents of a different folder in the same list. I've accomplished this by changing the querystringparameter name for each list view to its own unique name (ie. "R1", "R2", "R3", rather than all being "RootFolder"). The querystring in th...

SharePoint doc with linked column - Cannot complete this action &RootFolder=* bug?

Stock Sharepoint 2007 I created a Doc lib and added a new lookup colum to a list. when I click on the linked column in the document allitems view of the Doc Lib I get a url that ends with &RootFolder=* and error page that says Cannot Complete this action. If I remove the &RootFolder from the url the page opens the expected item on th...

SharePoint - multiple time and user stamped comments per list row and friendly named lookups

I suspect these are some of the limiations of SharePoint. Does anything in the SharePoint UI allow for a column to be added to a list that enable users to enter multiple time and user stamped entries to a single custom list row? For example like a comment column? And on the subject of connecting two list to each other. Ideally, we wou...

Refresh Sharepoint-linked Table in Access?

I have an access table in 2007 that is linked to a sharepoint list. When a new record is added to the sharepoint list, the change does not get automatically reflected in the access table. If you right click on the linked table, there is an option to "refresh list" which does exactly as you would expect. My question is how to perform t...

How to write code that calls a WCF service and falls back from Kerberos to NTLM if needed?

I need to call a WCF service programmatically. The service may be hosted with either NTLM or Kerberos authentication and needs to work under either. That is, if connecting to the service via Kerberos fails, then it should fall back to NTLM. Here's the code I'm using for Kerberos auth (if relevant, the service is hosted in SharePoint 201...

sharepoint 2010:how to create a form library programmatically

Can anyone guide me for creating a Form library programmatically using C#.This is used for publishing infopath form. After creating the form library i need to add the fully trusted file(.xsn file) to the FORM’s FOLDER of that particular library. ...

SharePoint - Modifying Customizing EditForm.aspx of Doc Lib breaks Upload Function - Unknown Error

Part of a bigger design issue really. But does anybody know why customizing EditForm.aspx of a Doc lib breaks the Upload function? and how to fix it so it does not. My version of the editform works great, but after an upload I get Unknown Error the resulting url looks like this: https://xxxxx.edu/sites/xxxx/_layouts/Upload.aspx?List=%...