Monday, April 3, 2017

Retention Policy or archival issues

Retention Policy or archival issues

To start with for investigation
1.There are two timer job services in Sharepoint 2010 ( it looks the same on 2013 as well) so ... "Information management policy" and "Expiration policy". check if these Job are working as desired for the web application. I understand it works partially on some instances. But I don't know if it is on the same webapp level.
  1. Next can you check if these documents are checked-out to some one on the team or to a person who has left the firm which is very common sometime User Profile service may give you tickle by not syncing as desired.
  2. If you have custom content type for which the the document is saved. then if the same content type exist on the destination folder ( drop off lib) where document to be moved.
I had a situation when the documents where located inside a folder (leaf) inside document library. Move of document expected a same folder on destination which was weird. But after changing folder name which had '(' symbol it worked.
I have also seen some instances of permissions to the folder for the timer job but, I did not have that experience.

If Move to recycle bin is working but Transfer isn't, I'm assuming your destination site is the same as the source. If so, this is not going to work because according to Microsoft support
It was as per design. If you try to move documents to a different location using Retention policy, you have to move it a library in a different site collection. Preferably ‘Records center‘ site collection. Main idea of Microsoft is to have one Archival or Records center site collection for the whole organization.
So, if you are trying to move documents after expiration to a library in same site or site collection, you can use a workaround to start a workflow on expiration date which moves the document to archival library.

User Profile sync issue

Uncompleted article (bare with me):

http://aarohblah.blogspot.com/2016/02/my-notes-on-sharepoint-2013-user.html

https://blogs.msdn.microsoft.com/spsocial/2010/05/04/how-user-profile-synchronization-works-in-sharepoint-2010/


Sunday, April 2, 2017

SharePoint List and Library limitations

Uncompleted article (bare with me):

SharePoint Online

List view threshold limit in site libraries or lists
5000 max items per view (without index) and 12 lookup columns per view. For more information, see Manage large lists and libraries in Office 365.
5000 max items per view (without index) and 12 lookup columns per view. For more information, see Manage large lists and libraries in Office 365.
Terms in term store
200,000
200,000
Site collection storage limit
Up to 25 TB per site collection.
Up to 25 TB per site collection.
Kiosk workers (plans K1-K2) cannot administer SharePoint site collections. You will need a license for at least one Enterprise plan user to manage Kiosk site collections.
Site collections (#) per tenant
500,000 site collections (other than personal sites).
500,000 site collections.
Subsites
Recommended up to 2,000 subsites per site collection
Recommended up to 2,000 subsites per site collection

To increase the List View Threshold:

You have to change the List View Threshold to the number of items returnd in one database query.
  1. You do that in Centra Administration > Application Management > Manage Web applications. In the ribbon
  2. select the Web application you want to edit
  3. select General Settings
  4. edit List View Threshold item limit.
enter image description here enter image description here

OneDrive vs SP Online

You can store, sync, and share files with both OneDrive and SharePoint. This table explains some of the similarities and differences of these components of Office 365.

OneDrive for Business

SharePoint Online

Included in Office 365 Business plansIncluded in Office 365 Business plans
Available as a stand-alone service, and there is a similarly-named consumer versionAvailable as a stand-alone service, but no consumer-facing version exists
Evolved from a service called SharePoint Workspace 2010, and before that Groove 2007Cloud-based version of the SharePoint service that dates back to Office XP
Core architecture built on (or “powered behind the scenes” by) SharePointCore architecture built on (or “powered behind the scenes” by) SharePoint
Often considered or called a “storage location”Often considered or called a “team site”
Could be thought of as the cloud version of the My Documents folder on your work computerCould be thought of as an internal website and/or file server alternative
Manage files/data with metadata and versioningManage files/data with metadata and versioning
Accessed from browser or local folder or app depending on user preferenceUsually accessed from a browser to use all features, but files can be accessed from local folder
OneDrive for Business sync app is used to sync OneDrive for Business files to a folder on local computerOneDrive for Business sync app is used to sync SharePoint files to a folder on local computer (separate from OneDrive for Business folder)
All uploads default as private until you decide to shareUploads default to inherit permissions from the directory/folder in which they are uploaded
Users sign in to their own OneDrive for Business accounts, with no shared interfaceUsers can access SharePoint as a branded company page, managed by an admin, that acts as a dashboard with news, calendar, etc.
Best place to upload private work documents that only you intend to see, or a document that has a limited scope or lifecycle (for example, a doc you only share once)Best place to upload team files and/or documents that are intended to be collaborative and/or use check-in workflows and permissioning
So, OneDrive for Business and SharePoint Online: not exactly the same, yet not entirely different.
The real, noticeable differences will come with the way your workplace or department decides to use SharePoint. Organizations use SharePoint for project-based management sites, human resources portals, and more. OneDrive for Business uses SharePoint technology, but is better suited for storage and one-off sharing. Both of these components live in the cloud (it is Office 365, after all) and can sync files to your device so you can work anywhere.

Thursday, April 16, 2015

Exception Trying to use an SPWeb object that has been closed or disposed and is no longer valid


A common mistake that people make in their code with this exception.
SPWeb, SPSite objects leak memory if they are not disposed properly.
The problem is so much talked about that as soon as we think of SPSite and SPWeb we unconsciously put using (SPWeb spweb = blah blah)
However when you use SPContext to get site or web object you should not be using “USING” or you should not dispose that object.  SPContext is passed to another web part on the page and SharePoint will dispose it when done.
Hence if you have been using (SPSite spsite = SPContext.Current.Site) it is wrong.  It might not always break as you might just have one web part in your code but you will see it break as soon as you add another web part and may be try to check in the page.

so change
using (SPSite spsite = SPContext.Current.Site)
to
SPSite site = SPContext.Current.Site.

Friday, March 27, 2015

Export to Excel issue - no events work

Post Back does not work after writing files to response or
After Export To Excel Button Event No Events Firing In Sharepoint?


I had this issue with sharepoint. I have a button on the page that sends a file and after clicking the button, the rest of the form was unresponsive. Turns out it is a sharepoint thing that sets the variable _spFormOnSubmitCalled to true to prevent any further submits. When we send a file this doesn't refresh the page so we need to manually set this variable back to false.
On your button in the webpart set the OnClientClick to a function in your javascript for the page.<asp:Button ID="generateExcel" runat="server" Text="Export Excel"OnClick="generateExcel_Click" OnClientClick="javascript:setFormSubmitToFalse()" />
Then in the javascript I have this function.
<script language="javascript" type="text/javascript">
    function setFormSubmitToFalse() {
        setTimeout(function () { _spFormOnSubmitCalled = false; }, 3000);
        return true;
    }
</script>
The 3 second pause I found was necessary because otherwise I was setting the variable before sharepoint set it. This way I let sharepoint set it normally then I set it back to false right after.

Thursday, March 12, 2015

SharePoint Performance Improvement with custom applications

Notes:

The following documented resources from the Internet are applicable to, or have been used to compile and validate the content of, this document:
·         SharePoint Developer Center: http://msdn.microsoft.com/en-us/sharepoint/default
·         Best Practices with SharePoint Foundation: http://msdn.microsoft.com/en-us/library/ee556427(office.14).aspx 



SharePoint Performance improvement:
1. Impersonation can significantly affect performance and scaling. It is generally more expensive to impersonate a client on a call than to make the call directly. 

3. Using PageAsyncTask to improve the performance of your website
     
5.    SharePoint 2010 Performance – Improvement Steps
a.    Use XSLT instead of grids.
b.    Disable view state if you are not performing any use actions.
c.    Don’t throw exceptions; re throw exceptions are much costlier in terms of memory consumption and execution.
d.    Minimize exception handling blocks, use exception block where ever you are not able to handle or pretend exceptions.
e.     
6.    Don’t run production ASP.NET Applications with debug=”true” enabled
a.    If you publish using Debug mode, your generated files have debugging enabled and that will impact the performance.
b.