New answers tagged

0

You can use following url. http://spsite/_layouts/download.aspx?SourceUrl=http://spsite/Documents/sample.pdf download.aspx will read the content of the file you send as the SourceUrl, and render it back to you on the HTTP response


0

I am unsure about the another answer, but you could also try going to list settings -> Advanced settings -> Opening documents in a browser -> Select "Open in a client application". That way your other libraries will not be impacted by the changes.


0

If your problem really is with DNS, you might try adding an entry to the hosts file (c:\windows\system32\drivers\etc\hosts) on your SharePoint machine, and add an entry like this: 192.168.101.4 spapps.contoso.com Where you replace 192.168.101.4 with the actual IP of your remote web. If by "We do not have any dns entry registered for the http url", you ...


0

Not sure if you understand the architecture of these addins, but it might help you troubleshooting the issue. An office add-in is in basic a web page that is hosted in a sort of Iframe in the office application. So when you run the sample it spins up a local iis to host the site en load in the office client. For developing you don't need internet acces, but ...


1

This sounds like intermittent communication issues between the client and the server. When the client PC sees 'this page cannot be displayed', have you done any checks to see whether the client PC can ping the SharePoint server, or resolve the server over the network? If not, that would be the first place I'd start. Can the client PC see other sites on the ...


2

This may because of the SharePoint "Browser File handling" setting. It has to be changed on the SharePoint Centra Admin (or via PowerShell), look at http://sharepoint.stackexchange.com/a/29350/35604 for instance, or here for more details.


0

For uploading file, AngularJs does not work in jQuery way! In earlier time, I had a R&D and made it working. Find below: function fileUploadRequest(data, url) { var deferred = $q.defer(); $http({ url: baseUrl + url, method: "POST", processData: false, data: data, ...


1

IMO, the fastest would be to get all responses for a given QuestionId: In both cases, you'll have to retrieve all items for the QuestionId. The total number of items is the same in both cases. So the traffic on the network will finaly be the same, as well as the the memory consumption. However, in the latter case (get all items and do the loop yourself): ...


0

What you're really looking for here is an event receiver, which of course isn't going to be supported by client side code and therefore normal SharePoint hosted solutions that don't involve pinging your list every 10 seconds aren't going to work. You could set this up as a provider-hosted solution, although the way they work (SharePoint will try to contact ...


0

You could use the REST API, with jQuery Ajax to get the items from the list. At the page load, save the ID of Top-1 item when queried descending on Created date. Now all you need to do is query the list every 10 seconds through REST, and see if the top 1 item you get has a new ID or not. If it has, give a popup on the page. This is just a basic setup for ...


1

I am not sure about the performance, but my preferred approach would be to fire five CAML queries in parallel. That way you reduce the execution time by approx. 80%. You should also think about the frequency with which you need to get this data. Although 100 responses might not make much of a difference, for a larger number of responses and a frequency of ...


0

While browsing through other similar Stackexchange questions I found this post containing the exact answer to your question although Microsoft documentation doesn't say anything about it. var context = SP.ClientContext.get_current(); var list = context.get_web().getList("/sites/dev/Lists/Addresses"); context.load(list); context.executeQueryAsync(function() ...


0

Assuming your add-in doesn't include an appweb/appweb borne feature activations then the app package is little more than UI sugar, as the app can be launched using a javascript widget that navigates to the AppRedirect.aspx page using the apps ClientId and SPHostUrl querystring parameters. This is what the LaunchApp(appInstanceId, clientId, launchUrl, ...


0

If I understand you correctly, You are trying to create two separate views for two departments, And you wish to open the default view based on the department that is opening the form. And later you wish to submit the form to a single document library. Yes this can be done by creating two different links for each department and in the source URL we need to ...


0

I ended up trying to repair my install of Sharepoint Foundation 2013. Did not work. However I uninstalled Sharepoint Foundation and reinstalled it and my problem was fixed. Thanks for all the helps.


1

To resolve the error make sure that the account being used to run Visual Studio is a db_owner on the SharePoint config and SharePoint admin databases.


0

Seems like you have typo in the last async call as javascript is case sensitive. Try executeQueryAsync instead of ExecuteQueryAsync. context.executeQueryAsync(Function.createDelegate(this, successHandler1), Function.createDelegate(this, errorHandler1));


0

OK - got this finally. Found and installed a CU for Service Bus, rebooted server and logged in as the SP Administrator, not the domain admin. Ran the configurator and it's done. Next problem - unhandled exception in Workflow Service Host.


0

Same here. SP Online is very very unstable. If something like this happens, you have to recreate your site collection or you have to change the name and GUID of your app and install it again. But if you have content in app parts for example, you will lose it.


0

The cause was SharePoint behaviour. Here are the steps to reproduce: Go into Term Store Management and create a custom termset. Create a new site field based on that termset. Add the field to the list. Add some list items with values from the termset. Go into Term Store Management, edit the termset, and select Use this Term Set for Site Navigation. At ...


0

I did some more investigating and copied a working header, then posted its url side by side and found it almost immediately, should stand out! _api/SP.AppContextSite(@target)/web/lists/getbytitle /_api/SP.AppContextSite(@target)/web/getfolderbyserverrelativeurl leading / is not supposed to be there :|- Hope that helps someone.


0

I just needed to grant the app read permissions to the user profiles.


2

Using JSOM you can find out whether the user is a domain user or not. But there is no JSOM method available to expand a domain group and find the users. If you want to stick with JavaScript then you should create a web service, that can give you the information. Deploy the web service under SharePoint context and use AJAX for getting the data.


0

At last I managed to solve my problem by creating and use a custom WCF service to call the Reputation.SetLike method. Not really the way I would have preferred but in lack of alternatives it was the fastest way forward. IProxyService.cs [ServiceContract] interface IProxyService { [OperationContract] [WebInvoke(Method="POST", UriTemplate = ...


1

Am I crazy or should you need Get, not Post? url: query, method: "POST", headers: {


0

Do you have an Office 365 SharePoint site? If yes, did you use its URL when creating the project, on that screen:? Instead of your workstation name, you need to enter the URL of a real SharePoint site (either an Office 365 developer site -create one by following the link in the dialog, or an on-premises SharePoint farm).


0

Are u sure you have correct version of office developer tools installed? Try uninstalling office developer tools and reinstall from this location http://aka.ms/OfficeDevToolsForVS2015


0

try this... replace this data: JSON.stringify({ query: { __metadata: { type: "SP.CamlQuery" }, ViewXml: "<ViewFields><FieldRef Name='FileLeafRef' /> <FieldRef Name='Title' /> </ViewFields> <QueryOptions> ...


0

Couple of things make sure: SharePoint Admin services is running on all servers in farm SharePoint Timer Services also running Make Sure Security Token Services is up Reset IIS on all server. Restart Timer and admin jobs Also check this one ...


1

You have to add a RemoteEndPoint to your solution. In the appmanifest, go to the tab 'Remote End Points'and write the url where you need to consume the information


1

What you are looking for are called "Remote Event Receivers" and they are only available in Provider Hosted Add-Ins (https://msdn.microsoft.com/en-us/library/office/jj220043.aspx.) Given that SP Hosted Add-Ins can only use javascript that executes in the browser, there is no way to react to an OOTB event such as ItemUpdated. What you could do is implement ...


0

protected void btnItemCreation_Click(object sender, EventArgs e) { using (SPSite site = new SPSite(SPContext.Current.Web.Url)) { using (SPWeb web = site.OpenWeb()) { SPListItem item; SPList list = web.Lists.TryGetList("List_Name"); item = list.Items.Add(); item["People_or_Group_Name"] = ...


0

try use this: .ms-promlink-body{position: static;width: inherit;height: inherit;} .ms-promlink-header{display:none} In my SharePoint 2013 I have successfully with this code. reggards,


0

I hope I undestand correctly. You have a SharePoint list form and on that form you want a button that creates a task in another list? If so, this is what I would do using javascript. Add the button and javascript to the form through a content editor webpart. Either directly or through a linked html file. In the onclick event of that button make either a ...


0

Make sure you have read permissions on the site. If you already have them, then try to assign yourself "colaborate" permissions.


0

You could consider at least two options to rename a file. Option 1. Rename file name You could update the name of the existing list item as demonstrated below Example function rename(webUrl,listTitle,itemId,fileName){ var endpointUrl = webUrl + "/_api/web/lists/getbytitle('" + listTitle + "')/items(" + itemId + ")"; return executeJson(endpointUrl) ...


0

The cause of the problem is the way Visual Studio enourages you to deploy your package: with its built-in "F5"/"all-in-one" process. When you install/deploy a package from VS, VS does trigger all actions: WSP installation and deployment, and then feature activation. This means the feature is activated from inside the process "devenv.exe" (i.e. Visual ...


0

So a couple of things you are going to need to do here is to make sure you get the form digest before you can update the list. To find this information take a look at Wictor Wilen's blog. In the section under "How to refresh Token" you can see how to get the form digest. Once you have that, you need to update the list item. It's pretty straight forward. ...


1

The SharePoint hosted app model, that you are referring to doesn't magically give the user more permissions than they already have, because if it did it would a be a security flaw, as you point out. Thus a SharePoint hosted app, will always use the current users permissions, as everything is run in the context of the users. On the other hand if you build ...


0

this solved the issue: 1 ) go to C:\Windows\System32\Drivers\etc open the hosts file and set the dynamic IP of your machine facing you site url example 10.120.54.182 momo.at.morocco 2) save and try again, it works


0

Verify if the SharePoint Timer Service is running fine.


2

_spPageContextInfo.currentUICultureName is the culture used to determine UI's language (Language used in the website's menus) _spPageContextInfo.currentCultureName is the culture used for numbers/date formatting... http://sprecipe.com/2016/02/08/_sppagecontextinfo-difference-between-currentculturename-and-currentuiculturename/


3

Yes, it's still valid, as it's still a SharePoint. You can read more about the limits at TechNet site: https://technet.microsoft.com/en-us/library/cc262787.aspx As you can see limitation are the same for SharePoint 2013 on premise and SharePoint online


3

As you have tagged SharePoint Apps, You need the client side solution I guess. Following is the REST API solution. @Bhaskar already mentioned that SPView does not store the info who has created it. But when we create a view, SP creates a file like viewName.aspx. We can get this file path by following request. /_api/web/lists/getByTitle('List ...


6

You cannot get the information who a view created because it's not cover by the object model. The SPView object doesn't store a property for modified or created. To get the information all you can do is to get the information from the file. So for the view "All Items" you need to request the file allitems.aspx. The SPFile object stores the "Created", ...


3

No, it won't impact the outcome for production even if you have a separate domain for SharePoint Addins in production. It is used as a security measure, but that requirement may not exist in a development environment.


1

Try This, Declare a Client context ctx and get your list/library name: RoleDefinition roleDef = ctx.Web.RoleDefinitions.GetByType(RoleType.Reader); RoleDefinitionBindingCollection roleDefBinding = new RoleDefinitionBindingCollection( ctx ); ctx.ExecuteQuery(); roleDefBinding.Add( roleDef ); CamlQuery query; query = ...


1

The following example shows how to retrieve all of the files in a folder. url: http://site url/_api/web/GetFolderByServerRelativeUrl('/Folder Name')/Files method: GET headers: Authorization: "Bearer " + accessToken accept: "application/json;odata=verbose" or "application/atom+xml" Does this help? Source


2

One of the peculiarities of the add-in model is that when you declaratively create things like content types within the add-in solutions that you're working with, they are only available within the add-in (or app) web. This is true for both SharePoint hosted and Provider Hosted add-ins. To make the content type available within your host web you could use ...


1

The reason you are seeing differences is that in the first part you are modifying/creating a view for the list. In the second you are adding in a list view web part to your page. When you add a list view web part it will go back to the default view. If you want to change it you can do so by going to the web part properties and selecting your view that you ...



Top 50 recent answers are included