Error accessing SPContext.Current.Site.ID for specific users
Hi,I have a custom menu item in the ECB context menu. When user selects the custom menu item, we are retrieving the site id using Guid currentSiteId= SPContext.Current.Site.ID But this results in...
View ArticleEvent receiver when form added to library(Item added)..
I am looking to deploy the event receiver code below which should perform a re link documents when user adds a form to the form library and same way when user updates the form event should perform re...
View Articletrying to undeclare a sharepoint 2010 record programatically failing (also...
hi i'm trying to undeclare a record in a workflow with the method Records.UndeclareItemAsRecord(SPListItem)in general this works, however sometimes I get the error trace back (see below)It seems like...
View ArticleIf inside query
Hi, I have a query that I have to return Title only if it exists, if it doens't exist I have to get LinkFilename. How do I do that pls? result =...
View ArticleIf inside repeater
I have a repeater that gets value from a DataTable. I would like to show the "Title" but if "Title" is empty it should show the "Name" instead. Any help pls?<asp:Repeater ID="rptDocumentsRecents"...
View ArticleISO tools and techniques for dealing with bad doc libraries and lists
The farm was upgraded from MOSS 2007 to SP 2010. There are a small number of sites that contain lists and libraries which are no longer accessible. I would like to delete these, but when I open the...
View ArticlePowerShell command reporting "Exception calling "Update" with "0" arguments
I have a little script to delete a couple of objects in a sharepoint site. My code is:> cat myscript.ps1 $web = get-spweb -Identity http://mysp2010farm/sites/simplestuff $list =...
View ArticleAny issues using Visual Studio 2013 with Sharepoint 2010 and Sharepoint...
We are debating on whether to use a currently-owned copy of VS 2010 or VS 2013 ...we have money in the budget for that.We have a new resource who knows VS and C# so we want to make our apps more...
View ArticleDate format throughout the site should be dd-MMM-yyyy
I want all dates in the site to be displayed in "dd-MMM-yyyy" format.I want to achieve this using regional settings and don't want to use ddwrt:FormatDate function at each page where date is displayed....
View ArticleHow to total an amount column based on selection of drop down in another column
I need to put a sum of the "Amount" column, in the "Forecasted Total" column when the drop down selection is equal to Forecasted in the Forecasted/Commited column. Will also do same for committed...
View ArticleSPSiteDataQuery remove folders from result
I have a SPSiteDataQuery that returns me all the files but also the folders and I don't want the folders. How can I filter that? List<DocumentsRecentsItem> result; SPSiteDataQuery query = new...
View ArticleAdd Control Dynamically to SharePoint list page
I have custom control need to register on the Edit page of the document library. These libraries are already existing on the customer instances. Need to find some way to register and add the control to...
View Articlewhere to put javascript code?
Hello,I am trying to set some columns in a list as "read-only" and is using the following code:<script type=”text/javascript”>function SetReadOnly(){var...
View ArticleDetecting value in Html type field
Hello,Ive created a custom list definition where I have a field of type Html with RichText set to true, and RichTextMode set to FullHtml. I'm currently unable to detect a value in that field...
View ArticleCan I check if the user wants to upload a file as a new version programatically?
We have a document library and we added an event receiver to move the files out of the root folder accordingly to our business requirements. I am having issues now because I am trying to check if the...
View ArticleRetrieve List Items based on condition in Where Clause
Hello Experts, I am trying to retrieve list items from a list (CityList) which contains 2 columns one is city(string) and State(Lookup) based on Lookup value, but i am getting all city names.here is...
View ArticleResend email when it could not be send
Hi,I have a webservices that use SmtpClient to send emails. There are times I get this error: "Attempted to read or write protected memory This is often an indication that other memory is corrupt" in...
View ArticleRanking the Sharepoint List Items
Hi,I am having Sharepoint list with the below valuesID Score Priority ------------------------------------- 15 40 Critical 26 43...
View Articleweb part tool pane properties to have a property where user can change list...
I need to create a property in web part tool pane like a text box where user can add a list guid in the property window so that user can change the list guid which can be applied..Please find the code...
View ArticleSPSecurity.RunWithElevatedPrivileges Not Working for Read Only Permissions Users
I have the following code in a method that generates tabbed web parts on any page in SharePoint 2010.The problem is that it will not work for users who have Read access only on a SharePoint site. It...
View Article