Tag Info

New answers tagged

-2

You can get the site url like this: var siteUrl = "<%= SPContext.Current.Web.Url %>";


0

I love it when 5 minutes later I figure it out. Make sure for anyone who is also having this problem, check your RegistrationId to be sure it is pointing to the right list. that was my mistake. Here is a link to a list of them.


1

Please install Office Developer Tools for Visual Studio 2012: http://blogs.msdn.com/b/somasegar/archive/2013/03/04/now-available-office-developer-tools-for-visual-studio-2012.aspx This will add missing project templates to VS 2012.


2

Code wizards, correct me if I'm wrong, but I think the first is a lamda which basically states this anonymous function is bound anonymously, but is not instantiated. The second is a delegate that is also instantiated. It's the same as saying: MyHelloDelegateType2 Hello3 = delegate { MessageBox.Show("Default message!"); }; but you need to instantiate it, ...


0

You have to explicitly request the RootWeb before : Web rootWeb = clientContext.Site.RootWeb; clientContext.Load(rootWeb, rw => rw.Url); clientContext.ExecuteQuery(); then you can use rootWeb.Url


0

Please check the below link. SDK for SharePoint 2013 http://www.microsoft.com/en-in/download/confirmation.aspx?id=30722


0

@Ronak, here is the script: <script type="text/javascript"> $(document).ready(function () { // Hide all Add new button links on the page. $('[id^="Hero-WPQ"]').hide(); }); </script>


1

We had the same problem in our environment couple of months of ago, when ever you try to update the solution it says successfully deployed but still no changes showed. Almost same steps we followed as you mentioned. Finally we use some tool to check which Dll load in the Timer services and here we found our problem. SO in our case easy fix was Restart ...


0

Simply check Web management service & windows process activation services in IIS, start both if they are set manual,& try then.


1

This answer assumes you are using a standard SQL Membership Provider and vanilla database. (And this is not really a SharePoint issue, this is more of a .NET issue you are implementing in a SharePoint context.) Essentially, what you want to do is insert some rows into a database. There are a number of ways to access a database, but I prefer Entity ...


1

Well they should be same, specially when you are going to use Backup/Restore of site or Import/Export. If you are just going to prepare a WSP solution and use that in different environments, it should work but there maybe complications. Safe side, they should be same versions. You have two options: 1- Either you use External Content Types, External Lists ...


0

First at all. You need to connect to SharePoint Online. You can make a console application to make your tests. Depends of what you need.. you are going to need a tenant Administrator or not. Check these links that are going to help you. How to create a site collection in SP Online Find dlls


1

Instead of itemId use {SelectedItemId} For more information see this http://msdn.microsoft.com/en-us/library/office/ff458385(v=office.15).aspx


0

Try this inside the catch block: catch(Exception ex) { SPListItem item = properties.Listitem; item["MultiTextFieldName"] = ex.Message; item.Update(); }


0

Solded wrapping my code into Usings (probably the Context was missing) using (SPSite site = new SPSite(Web.Site.ID)) { var context = SPServiceContext.GetContext(site); using (var scope = new SPServiceContextScope(context)) { using (Web) { //my code } } }


0

Step1: Write the code in EnableViewState.aspx. Step2: Run the application Step3: After click on Check button. For full solution see this: http://www.mindstick.com/blog/683/EnableViewState%20in%20ASP%20NET


0

Solved it thanks to a co-worker (he should get the credits here): Only the Id of the term is not enough. You need to add some extra info: /// <summary> /// Sets the taxonomy field value. /// </summary> /// <param name="item">The item.</param> /// <param name="fieldName">Name of the ...


1

I don't think there would be a way around. Because it seems that they have intentionally kept this feature and hence provided the Save Conflict popup to deal with the situation. Update : Using Page Layout you can hide it as follows. Wrap <b> <SharePoint:EncodedLiteral runat="server" ...


0

when i deploy my sp project i found this problem Error 66 Error occurred in deployment step 'Recycle IIS Application Pool': Remote SharePoint site connections are not supported. Parameter name: project0 0 Components


1

The webpart is deployed as part of a feature. Activate the feature in new site collection and then the webpart will be available.


0

The answer of Cann0nF0dder is applicable to fields of type "LookupMulti" too. I allready tried. For short: "In order to allow enter multiple values into field with Type="UserMulti" you must set attribute Mult="TRUE"." on my revised case is valid too for: "...Type="LookupMulti"..."


0

The 'System.Management.Automation' dll issues have several sources and in your case, it's also coupled with changes in the SharePoint versions (2010/2013) and the move to 64-bit Server 2012 (presuming your SP2010 was on a 32-bit platform). Here's a checklist of items to look into - A). Check Execution Policy of script: Set-ExecutionPolicy -ExecutionPolicy ...


1

This can be achieved by creating a CustomAction. The CustomAction will create an ECB menu. On click of the menu a page (usually a layouts page) will be called. The CustomAction will pass the current list and list item ID to the page. The page will contain code to read the passed information and send email with attachment. An ECB menu example: <?xml ...


1

Some remarks that may help: You may have an endless loop since the call to .Update triggers itself a new update and then the Event Receiver... You may not notice it immediately since SharePoint 2013 has now a protection that stops the re-entrance after 10 occurrences... Simply add EventFiringEnabled = false; at the begin of your ItemUpdated method and then ...


1

I'm afraid a good answer here will always involve not doing such a thing... Launching a new process from a Web (ASP.NET) context is a bad idea. And even worse in the context of SharePoint. A RunWithElevatedPrivileges call won't change anything here: it just ensures your code runs under the identity of the application pool (see in IIS). For a SharePoint ...


0

for your firt quetion: I have been create the next css On my seattle.html I add this line: And the result is this: second question: try to add your css just above the head closing tag, because as you know html and css are sequentials so all your styles will be overwritten if another css execute after yours. third question: to this apply the answer ...


0

LookUp Field Values are stored in format (ID);#(VALUE) You can use below line of code SPFieldLookup lookUpField = (SPFieldLookup)myList.Fields["DMR No."]; SPList lookupSourceList = myList.ParentWeb.Lists[lookUpField.LookupList]; SPQuery query = new Microsoft.SharePoint.SPQuery(); query.Query = String.Format("{0}", lookupValue); SPListItemCollection ...


0

The list template Id was incorrect. For some reason it was stated as '1230' which I'm still unsure to what that is but I've changed it to 100 and 107 respectively.


0

change the folder that it looks onto in SPDesigner on the subsite's details/home screen


0

Open the site in designer and then open any site page. Then set it as the home page. Alternatively you can directly open the Site Settings page using URL http://site/subsite/_layouts/settings.aspx


-1

.ms-rteBakcColor-XX is not working for me


0

Seems like space in column name will be converted to _x0020_ so you can access the column by internal name as oListItem["Stage_x0020_"+ count]


0

its not hitting as its based on the older OWSTIMER!!!! firstly deploy your solution. Once deployed goto your service in services.msc and look for your timer service to restart. on 2010 it looks like: sharepoint 2010 timer service. right click and select restart. now your timer service would stop and restart loading the new changes or addition you have ...


0

This is a common VS issue that we see usually. Make sure that you are attaching to the appropriate running instance of w3wp.exe while debugging. If the issue is still there, restart Visual Studio, clean-up, build and redeploy the Event Handler and then debug. Worked perfect for me.


1

How to create Document and upload it into SharePoint Online library: var fileName = @"SharePoint User Guide.docx"; var targetUrl = "/Shared Documents"; using (var stream = new MemoryStream()) { //1. Create Document using (var document = WordprocessingDocument.Create(stream, WordprocessingDocumentType.Document, true)) { ...



Top 50 recent answers are included