Affichage des articles dont le libellé est Recent Questions - SharePoint Stack Exchange. Afficher tous les articles
Affichage des articles dont le libellé est Recent Questions - SharePoint Stack Exchange. Afficher tous les articles

vendredi 27 mars 2015

How to set documenttemplate using powershell



How could i set this using powershell? $dst = [Microsoft.Office.DocumentManagement.DocumentSets.$dst.Update($true)]::GetDocumentSetTemplate("/_layouts/CreatePage.aspx")


$dst.Update()






SharePoint 2013 document generation - error cant open document



Im trying to use a document lib to generate documents.I have created 6 content types(as I need multiple templates) and associated doc templates to them. I read somewhere I should be using .docx instead of dotx as a template


But cant get it to work arg!!! enter image description here






jeudi 26 mars 2015

Events/Changelogs in the new Office365 Files API



I'd like to know if this new Office 365 API provides changelogs for diff events that occur on OneDrive for a tenant user like Share, Unshare, Create Update, Delete events etc.


Much appreciated!






SSRS report from SharePoint list



We have created an SSRS report from SharePoint 2010 list. We have item level permission in the source list, so the user can view only the items for which they have privilege. But in SSRS report it picks all records without filtering out using access privilege.


Is there any option in SSRS to filtering out data using access privilege of current user? If not could you explain why?






How to check one user's permissions for the root site and all the subsites?



we are using O365/SharePoint Online 2013.


Is there any way to check a specific user's permissions for the root site in question and all of its subsites so basically all sites in a site collection? We have 10 subsites and some users can access a few of them and some might have the access to every one of them.


From time to time I get asked to check where one specific user has access to and at the moment the only way I have found is to check the user permissions one site at a time. That is quite time-consuming, so is there any easy/quick way to see all the sites a user has access to?


I greatly appreciate any information regarding this matter!






How to lock certain rows in sharepoint web access list?



How to lock certain rows in sharepoint web access list? It would be useful to lock the rows whichever is completed and to eliminate the further updating.


Thanks






How to find out missing or deleted site collections in Staging Environment



We have created some 40+ site collections in staging environment.On the dev machines we used to development and deploy the wsps and run the powershell scripts in UAT to create site collections and sites.Yesterday when we started doing normal testing of our portal,we found that ROOT site colelction and another important site collection were missing.I checked the event viewer logs information in the UAT box.But did not find anything mysterious.Can anyone help how to find out why this happened?This happened within 12 hrs of time.If I enable Auditing on this SP Farm, will it help me to find what happened on those sites.I checked the content database of one missing sitecollection.Its intact.Later customer reported us that they faced some issues in their SAN storage environment.I am not able to find the link between these two.






Upload list item attachment using JSOM



I am trying to upload list item attachment using the below code. There is no error in the code and all the variables are present with proper values but in uploadFile method it goes to error handler and says File not found. Can anyone help?



function UploadAttachment() {
this.filename = $('input[type=file]').val().split('\\').pop();
var args = window.frameElement.dialogArgs;
this.itemId = args.ItemId; //$.QueryString["ItemId"];
this.clientContext = new SP.ClientContext.get_current();
var outReachList = clientContext.get_web().get_lists().getByTitle('Outreach List');
this.listItem = outReachList.getItemById(itemId);
clientContext.load(listItem);
clientContext.executeQueryAsync(Function.createDelegate(this, this.HasListItemAttachment), Function.createDelegate(this, this.GetAllAttachmentsFailed));
}

function HasListItemAttachment() {
var attachmentFolderUrl = String.format('{0}/Attachments/{1}',listItem.get_fieldValues()['FileDirRef'], itemId);
console.log(attachmentFolderUrl);
this.attachmentFolder = clientContext.get_web().getFolderByServerRelativeUrl(attachmentFolderUrl);
clientContext.load(attachmentFolder);
clientContext.executeQueryAsync(Function.createDelegate(this, this.uploadFile), Function.createDelegate(this, GetAllAttachmentsFailed));
}

//function to actually upload file
function uploadFile() {
var file = document.getElementById("customFileUploadControl").files[0];
getFileBuffer(file).then( function(buffer) {
var bytes = new Uint8Array(buffer);
var content = new SP.Base64EncodedByteArray(); //base64 encoding
for (var b = 0; b < bytes.length; b++) {
content.append(bytes[b]);
}
var createInfo = new SP.FileCreationInformation();
createInfo.set_content(content); //setting the content of the new file
createInfo.set_url(filename);
attachmentFolder.add(createInfo);
clientContext.executeQueryAsync(Function.createDelegate(this, uploadFileSuccess), Function.createDelegate(this, GetAllAttachmentsFailed));
});
}

function uploadFileSuccess() {
SP.UI.ModalDialog.commonModalDialogClose(SP.UI.DialogResult.OK);
}

function GetAllAttachmentsFailed(sender, args) {
console.log('Request failed. ' + args.get_message() + '\n' + args.get_stackTrace());
}

function getFileBuffer(file){
var deferred = $.Deferred();
var reader = new FileReader();
reader.onload = function(e){
deferred.resolve(e.target.result);
}
reader.onerror = function(e){
deferred.reject(e.target.error);
}
reader.readAsArrayBuffer(file);
return deferred.promise();
}





SharePoint paging control always show 1-30 even there are 400 items



On our SP2013 on-premise farm there is a document library contains around 400 items. All these 400 items have individual permission (inheritance are broken).


If I open the libaray with All Site Content > Doc Library, the paging control is working as expected.


On one of page we have insert the Doc Libary as App. On that view the paging control always showing "1-30 >". When user click on ">" the page have changed but the control still show "1-30 >". Hence, user cannot switch to left page and cannot know the total number of items in libaray.


Is it known bug and can I work around it?






Help! Sharepoint library template broken after replacing



I Went in and changed a sharepoint template (*.xsn) which was being used by a document library to create and modify new items.


I thought the safe way would be to rename my new one over the top of the old...but now it won't allow me to create new items or open old ones in the library.


If I try to open an old library item now it attempts to open infopath and then complains about a domain permission level problem.


How do I link it the library all back to the new template correctly?






Is it possible to update a VS deployed app without changing app's URL?



I'm building a SharePoint hosted app which for now I'm deploying from VS. Every time I redeploy the changes, it completely reinstalls the app also changing its URL (the unique identifier part of it) which means I also need to change IIS bindings (my dev box doesn't have a DNS server) and some client side code every time as well.


Is there any way to update the app without changing its URL?






Cannot query SP.UserProfiles.PeopleManager from the App Web via REST



I'm testing REST results in the browser with mixed results.


The following URL returns the expected result:


http://ift.tt/1E7rCte


however the following URL returns an error:


http://ift.tt/1IB3K00


I get the error code -1, Microsoft.SharePoint.Client.ResourceNotFoundException and error message Cannot find resource for the request sp.userprofiles.peoplemanager. Google doesn't offer up much for the errors. Fiddler responds with a 404 result. I've tried leaving the URL unencoded, tried with lower case sp.userprofiles.peoplemanager and getuserprofilepropertyfor with no luck whatsover. I have also tried other methods within sp.userprofiles.peoplemanager. What am I doing wrong?






Field Labels in InfoPath?



Seems like a really simple question but I can't find anything about how to add labels to InfoPath fields?


I just want a text label beside a checkbox for example.


I know I can just type the text in beside the checkbox, but I would prefer to have an assigned label.


Surely this functionality exists?


Thanks






script in powershell to create a list and add a lookup column



Script to create a custom list and add a look up column into it and add the column into a default view. The look up column should have relationship of Restrict delete.






Need to stop Sharepoint from batching separate requests into single correlation id



I have an installation of Sharepoint 2013 which has a site with a custom full-trust Sharepoint solution web part installed on the main page. This custom web part does extension logging within ULS including start and end times of process execution for all of its custom routines. Under light load this web part performs well. The problem is that under moderate load of 50-250 concurrent users this web part experiences slow page loads of around 60 seconds in some cases. The Sharepoint farm is built to spec according to Microsoft’s recommended practices. Within SolarWinds monitoring we see that the Sharepoint farm’s hardware is not being strained. While investigating the problem I was surprised to find within the Sharepoint Web Front End ULS that Sharepoint appears to be batching separate user requests into a single Correlation Id. I can see this because every time I log to ULS within my custom code that I include the user's login id. The sizes of these batches vary. Some may have two separate user requests within them. Others can have up to 7 separate user requests. Furthermore what I see is that within the batch that there is significant delay in between processing of transactions within the batch. In some cases there can be 10 seconds of delay before the next user's transaction within the batch executes. I have analyzed the ULS logs and from what I have seen the custom code transactions typically execute within fractions of seconds. But the delay in between custom code transactions within the correlation id batch cause a lot of delay. How can I stop Sharepoint from batching separate requests in this way? Is there a configuration setting that can be set to stop this behavior?






Open Excel file in browser returns error



I have configured an excel document library to open in the browser.

The file was published to the document library.

The document library was set to open the file in the browser.


When the file is clicked, it makes an attempt to open the file in the browser but it returns an error message.



Unable to process the request.

Wait a few minutes and try performing this operation again.



What else is necessary to get the Excel file to open in the browser?Excel Open In Browser Error Message






Filter on Views don't work after update 2956175 is applied on SP2013 env



We have applied Filter on a task list view on the Assigned To column. This was working fine. Last friday we installed the Security patches available from Microsoft published on 3/10/15. Immediately we say that the filters were no longer working. Additional filters on Dates and Number fields also failed to work.


Has anybody faced this issue already? Was it resolved? How?


Is there a work around or a way to uninstall the KB security update?






Web Part Connection to multiple lists on web part page



I have a Web Part Page with multiple lists displayed on the page. All lists have a common column named 'Product'. I want to filer all web parts by the 'Product' field, using web part connections. I'm using the Product master list and connecting to all the other lists with the same column name. I want the user to select a Product via the built in list search, then click the web part connection selection icon to filter all the other lists. This is all working fine, except when the page reloads/refreshes to display the filtered result the master list refreshes back to the first item in the list. So, the child lists display the correct filtered values, but the master list reverts back to the first item. Is there a workaround for this? Or, a better option? Just to add, I have over 700 products in the list, so a list filter isn't an option. Thanks.






SharePoint redirects me to non-existent Account/Login page



I'm running into a weird situation. I have two web applications, both using Windows Authentication. They are both using the default login page, both disallow anonymous access, no other special configuration.


Both site collections are publishing sites.


When I navigate to Web Application 1 (port 80), after logging in, I see the landing page for the site collection, and everything works as expected.


When I navigate to Web Application 2 (port 81), after logging in, SharePoint tries to redirect me to [MySiteUrl]/Account/Login. There is no such page, or configuration that I am aware where this is specified. Because the page cannot be found, it directs me to the PageNotFoundError screen. Oddly enough, I am authenticated, so clicking "go to the site home" link does take me back to the home page.


enter image description here


The situation happens when accessing it internally on the server, or externally, so I don't think it's related to Access Mappings.


This is a fresh install of SharePoint, so I'm not really sure what could be the problem.






How can I get a list of all site urls, site titles, and their site owners through powershell?



I've been able to get the following:



Get-SPSite -Limit All |
Get-SPWeb -Limit All |
where { $_.HasUniquePerm -and $_.AssociatedOwnerGroup -ne $null } |
foreach {
$url = $_.Url; $_ } |
Select -ExpandProperty AssociatedOwnerGroup |
Select -ExpandProperty Users |
Select {$url}, UserLogin, DisplayName | Export-csv c:\test.csv -notypeinformation


This gives me the site url, site owner's logins and display names. However, I can't figure out how to also get the site title. I seem restricted to either getting the title or the url of a site. How can I pull back both through this method?