Tag Info

Hot answers tagged

6

properties.Status = SPEventReceiverStatus.CancelNoError; OR .CancelWithError


4

For those who are still looking for the answer. SharePoint 2013 (since SP1 at least see UPD below) contains special method Web.GetList. It accepts site-relative url for the list, i.e. site/dev/lists/mylist. Sample code for .NET object model: var ctx = new ClientContext("http://sp2013dev/sites/dev"); var list = ...


4

Why create a custom login page when you can achieve this by breaking the inheritance permission on that document library. Break the inheritance permission on the document library and grant permission to only those users/groups that should have access to the document library. Users/groups not granted access to this document library, will pop-up window asking ...


4

The master pages and page layouts are stored at site collection level and in master page gallery _catalogs/masterpage. But you can always have liberty to select different master page for each sub site or also inherit the master page from its parent which is a site collection. Webapplication won't have any master page for itself without a root site ...


3

In Central Administration navigate to your Search Service Application (Central Admin > Application Management > Manage Service Applications). In the Search Service Application, navigate to Crawl Log and select “Host Name” in the links at the top. Select the Host name URL where your page exist and paste the URL to your page in the search box below the text ...


3

You can easily do this by introducing a Calculated Field. Create a new Calculated field and use Formula =[Field1] & [Field2] Now modify you View and add the new Calculated Field and Remove Field2


3

This CU includes all SharePoint 2013 fixes released since SP1, That's mean you all set and your farm is up to date. For SharePoint foundation, You don't need to install the SharePoint Foundation separately if you have Server installed and Install the Server CU. So you all set here as April CU for server include all hot fixes till SP1 and also include the ...


3

Is this behavior for all users or only few and what about browser? In the real world scenario it should work, just make sure the Enable Client Integration at web app level. Central Administration > Application Management > Manage Web Applications > select the web application > Click Authentication Providers > select default zone, and select Yes for ...


3

I depends on many factors. Some of the rules I follow are Create Site Collections - For not related entities (Ex - Departments) Create Site Collection if we are dealing with large amount of data. This will enable us to split Content Database per site collection In all other cases I simply create site based on the organization structure.


3

Similar to the other posts, I recommend a single site collection for customers, and a subsite per customer. As far as sharing columns and such, use the Content Type Hub and load up your content types and throw those in your issues lists. If you don't have a site provisioning process, get one ;) this can handle your CTs and lists for you. Then using search ...


3

The following code snippet will prevent item deletion and also notify the user of what happened public override void ItemDeleting(SPItemEventProperties properties) { base.ItemDeleting(properties); properties.Status = SPEventReceiverStatus.CancelWithError; properties.ErrorMessage = "This item cannot be deleted; Contact your ...


3

Stemming is available in SharePoint 2013 and enabled by default. Stemming is only available on nouns and adjectives in 2013, you can't search on verbs. I.e if you search car search will return the results for Cars But if you search for Run it will only return the Run results not for Ran. Read More over here. ...


3

You coud use the SPList.GetItemByUniqueId method method like so: using (SPSite site = new SPSite(url)) { using (SPWeb web = site.OpenWeb()) { SPList list = web.Lists[listTitle]; SPListItem item = list.GetItemByUniqueId(itemGuid); } } or you could use a CAML query like so: SPList list = web.Lists["listTitle"]; SPQuery spQuery ...


3

Your first approach is the best way to add a custom css file to a master page. Backing up master page and then creating a custom master page, adding custom CSS file to Style Library and then adding external CSS link in <head> tag. All steps are the recommended and best approach. Just make sure to add the external css link just above the content place ...


3

Yes you can do this Using jQuery to dynamically change this on document.ready event Recommended way - Using JSLinks Option #2 you can use JavaScript to specify how a field should be rendered. For more check this article. http://zimmergren.net/technical/sp-2013-using-the-spfield-jslink-property-to-change-the-way-your-field-is-rendered-in-sharepoint-2013


3

Wouldn't you need to make this: ($link.url -like '.doc' -or $link.url -like '.docx' -or $link.url -like '.pdf') like this: ($link.url -like '*.doc' -or $link.url -like '*.docx' -or $link.url -like '*.pdf')


2

Yes this is sharepoint OOTB error.. No solution for this If you want all users to have search enabled you can break permission and give them contribute permision at list level. Enable the show ribbon ->Always true


2

For me, reprovisioning the distributed cache service resolved the performance issue: $serviceInstance. = Get-SPServiceInstance | Where { $_.TypeName -like "Distributed Cache"} $serviceInstance.Unprovision() $serviceInstance.Provision()


2

I have the same problem, and found solution - Here Corrupted node.ini file in AdminComponent1 folder - size 2kb, but empty when open with notepad. Solution - browse to: C:\Program Files\Microsoft Office Servers\15.0\Data\Office Server\Applications\Search\Nodes\ For each node, open the folder and browse to \Configuration\Local\ and check the node.ini ...


2

After upload you can do it as clientContext.load(this.newFile, 'ListItemAllFields'); var item = this.newFile.get_listItemAllFields(); item.set_item('Username', value); item.Update(); clientContext.ExecuteQuery...


2

If you didn't had a page already existing with name = "WelcomeNew", then people will try to access site and get Page Not Found error. An Ideal SharePoint approach is a follows Create an External Content Type (ECT) and use this to connect to you SQL Server In ECT you can define methods which you want to act on the backend (Ex: SQL Table) Read All Items ...


2

To disable the verbose logging level, you shouldn't left blank both drop down.you should select reset to default on both drop down. It will bring the logging level to medium. You can set this via Powershell as well. The Clear-SPLogLevel cmdlet resets the Windows event logging and trace logging levels for the specified categories to the default values. If ...


2

That is how crawl works. If you have PhoneNumber in these format: 1234567890 1234 567890 123 4567 890 123 456 7890 When crawling, every sign or space " ", "-", "_", "(", ")" is like delimiter and it is putted in new place inside array. For example: for 1. it will be array[0] with (1234567890), for 2. will be array[0 and 1] with (1234 and 567890) ...


2

If you do a .remove() instead of a .hide() the fields could (although I haven't seen it to be the case) get blanked out. You would likely see some sort of post back error in that the HTML delivered is different than what was sent, I saw this a lot when trying to modify dropdown lists. If you hide the rows with a .hide(), the fields are still present in the ...


2

The query /_api/lists/getbytitle('<list title>')/items?$select=* returns list items for visible fields only (SP.Field.hidden property is set to false). To be more precise the expression $select=* returns: visible fields values (query that returns visible field names: /_api/Web/Lists/getByTitle('<list ...


2

Try this (Excerpt from here): function getListItem(url, listname, id, complete, failure) { // Getting our list items $.ajax({ url: url + "/_api/web/lists/getbytitle('" + listname + "')/items(" + id + ")", method: "GET", headers: { "Accept": "application/json; odata=verbose" }, success: function (data) { // ...


2

You can not. You have to use an account with same privileges to replicate such behavior. SharePoint 2013 does not have an easy to reach UI function for logging in as another user. I tend to just run a new browser session as the test account I want to use. For the sake of completeness. You can append this to the URL of your site to have SP2013 request ...


2

There is an action in SPD Workflow available in both 2010 and 2013 version Set Workflow Variable This will store a field value in variable. The variable value would be updated if the field value updates. With this action you can even build strings. Stop Workflow action is no more available in SPD 2013 workflow. This action is deprecated in 2013.


2

We can store the field values into a workflow variable. For that first we need to create a variable and then assign values into it. 1. Create a workflow variable: From the ribbon you can select local variables and create as shown in below image. 2. Assign values to variable: From actions menu we need to select an OOB action Set Workflow Variable which ...


2

With JavaScript, you can get the current item id from variable _spPageContextInfo.pageItemId. Other spPageContextInfo variables are listed here. However, I'm not sure if having the "has been viewed" tag on the actual item is the best approach. Issue 1: Page is in edit mode, so you wouldn't be able to update the field when someone else views the latest ...



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