Tag Info

Hot answers tagged

7

AS PER MSDN SPList.ItemCount: The value of the ItemCount property includes folders within a document library, as well as files within subfolders. The value of the Count property of the SPListCollection class does not include folders. SPListItemCollection.Count: Gets the number of list items in the collection, excluding folders. BUT Although it's ...


3

You could also use _api/Web/Lists/GetByTitle('List title')/DefaultDisplayFormUrl If you want for all lists do _api/Web/Lists?$select=DefaultDisplayFormUrl Note that the property is not visible when visiting List directly, need full path or $select.


2

Use DefaultDisplayFormUrl at the time of loading the list in Javacript client object model. Example: var clientContext = new SP.ClientContext.get_current(); var list = clientContext.get_web().get_lists().getByTitle(listTitle); clientContext.load(list, 'DefaultDisplayFormUrl'); Then while enumerating the listitemcollection use get_defaultDisplayFormUrl() ...


2

Create a new custom Content Type with base as Document Set. Add the two Site columns Reference Number and Customer Name to that particular content type. In custom Document Set content Type , go to Document Set Settings and make the 2 columns as shared. Now all the documents inside the document set will share the value for that 2 columns. also go to the ...


2

Scalability and increased storage requirements is very common. MS has recently announced OneDrive for Business will have unlimited storage for its users. Sounds like you already have a subscription to this so your users would qualify http://blogs.office.com/2014/10/27/onedrive-now-unlimited-storage-office-365-subscribers/ ...


2

ItemAdding event is fired when a file is uploaded to the library. ItemUpdating is fired when custom properties in the form are saved.


2

You can use the WebClient class to check if the specified URL exists. Example: using(var client = new WebClient()) { try{ string check = client.DownloadString("http://siteroot/subsite"); } catch(Exception ex){ //if you get here the site doesn't exist } } Or you can use following code to check if site exists with X ...


2

Ribbon should already contain this information. You can get the view name like this: SP.Ribbon.PageManager.get_instance().getPageComponentById('WebPartWPQ2')._data.ViewName _data property contains all kinds of fun stuff.


2

Try the below code snippet SPWeb oWebsite = SPContext.Current.Web; SPDocumentLibrary oDocumentLibrary = (SPDocumentLibrary)oWebsite.Lists["DocLib_Name"]; SPListItemCollection collListItems = oDocumentLibrary.Items; foreach (SPListItem oListItem in collListItems) { var strAuthor = oListItem["Author"].ToString(); var author = new ...


1

If you mean the short-time locks placed on Office documents by SharePoint, I described a method how to remove such locks using FrontPage Server Extensions (FS) requests sent via JavaScript in this post. In first step you should invoke the getDocsMetaInfo method to get some info regarding the lock (like its ID, release date, etc.), then construct and post an ...


1

I got a script from this site http://www.mysharepointadventures.com/2011/08/powershell-script-to-display-unique-permissions-for-all-subsites-and-lists/ Syntax: <script name>.ps1 | out-file c:\permissions.txt #Add SharePoint PowerShell SnapIn if not already added if ((Get-PSSnapin "Microsoft.SharePoint.PowerShell" -ErrorAction SilentlyContinue) -eq ...


1

Here is an example to get lookupValue and lookupId var lookup = item.get_item('userCol'); var value= lookup.get_lookupValue(); var id= lookup.get_lookupId();


1

User field will be instance of SP.FieldUserValue. I don't think that inherits from SP.FieldLookupValue in contrast to say CSOM, ref SP.FieldUserValue.prototype.constructor is function and same with SP.FieldUserValue.constructor. So your check would be: var conditional = lookup instanceof SP.FieldUserValue; Another simple hack is to simply check if the ...


1

Please switch from custom .master page to default one, and test if it works then. Looks like your custom master page has some MOSS specific styles and even JavaScript that is not compatible with SP2010. Start from default master page and copy custom styles/JavaScript and other customizations one by one to determine which one is breaking the functionality. ...


1

Answering your first question - The "Expiration of the session" depends on SAML TokenLifetime and LogonTokenCacheExpirationWindow values. It doesn't depend on the cookie value. The cookie value is just a reference to the actual SAML Token. It is not an indicator of session validity. Regarding your second question, you may not want to increase the ADFS ...


1

I would actually use Access to do this... there is a builtin way to quickly do what you want and it can handle large lists fairly easily. Link the two tables into an Access database, then go to the 'Query Wizard' under create and then select 'Find Unmatched Query Wizard.' Select your Documents in the first dialog box, and then your Projects in the second ...


1

A user requests a web page by typing the web address in a browser. Out of two type of request GET request(Put request is used in entering request on server i.e. filling forms) makes a connection with web server, webserver send the requested page to the client in html format. SharePoint get it from Cache or from the Database server. When user type a query, ...


1

In best practice scenario, it is true. Dont use this wizard to configure all the services applications. You use the Config wizard very 1st time when you configure a farm and on first server to provision the state services(unchecked all other services applications). Once it completed then on all remaining server don't run it. Once Farm configured then you ...


1

The screenshot shows the People Picker and I take it you'd like to prevent certain Active Directory (AD, LDAP) Users from being shown. As you've tagged the question with Profile-Sync and talk about 'Search' you may be more concerned with multiple profiles in the User Profile Service (UPS). If it's the People Picker you're interested in then I'd suggest you ...


1

Yes, you can deploy the SharePoint as single server farm which is also called Limited Deployment. This type of deployment is good for Less then 100 users. Limited deployments are typically used for product evaluation, development and testing, or for environments that have limited numbers of users and don t require fault-tolerance. You should ...


1

A single server installation consists of one server that runs both SQL Server and SharePoint 2013. You can install and configure SharePoint 2013 on a single server if you are hosting only a few sites for a limited number of users or if you want to create a trial or development environment. This configuration is also useful if you want to configure a farm to ...


1

Ensure you have proper rights to run these command. Refer to this article. Let us know if it helped.


1

Following the code that you linked to will only hide certain profile properties (first name, last name, email, phone number, etc). It will not hide the actual profiles themselves. However, it looks as if you User Profile Service is either turned off or you do not have access to it. Make sure that you have access to the service. Also, make sure the User ...


1

Inside RunWithElevatedPrivileges you should impersonate current user. Something like var userToken = SPContext.Current.Web.AllUsers["domain\\user"].UserToken; using(SPSite site = new SPSite(SiteURL, UserToken)) list.Update(); //Will save the record as the selected user.


1

Fixed it by using the following code: SPFieldUserValueCollection users = new SPFieldUserValueCollection(web, item["Author"].ToString()); foreach (SPFieldUserValue userDetail in users) { SPUser user = userDetail.User; string email = userDetail.Email; }


1

You need to use the syntax Amal suggested but in the select statement, then expand the entire AssignedTo object. When you're on a page with jQuery loaded open your browser dev tools and enter this into the JavaScript console: $.getJSON( "/_api/lists/getByTitle('Tasks')/items?$select=AssignedTo/Id,AssignedTo/Title&$expand=AssignedTo", ...


1

First, the order you're attempting to perform the check vs the item creation in needs modified. You either need to check if a record will be valid, then submit it with separate actions -- or use something like an Exception Handling Scope to detect if the new item would violate your rules as it is being created. I think performing each action separately is ...


1

I had the same issue a while back too - the issue is when using WAS when your SP server is also a domain controller - which is typical in development environments. This was not an issue with SP2010 running Win Server 2008, but has crept in now with Win Server 2012 AD domain controllers. The reason being that WAS requires elevated privileges to run - ...


1

termValue = string.Format("{0}|{1}", term.Name, term.Id) if there is more values, they should be separated with ";"



Only top voted, non community-wiki answers of a minimum length are eligible