Quantcast
Channel: SharePoint 2013 - Development and Programming forum
Viewing all 7589 articles
Browse latest View live

Client-side field rendering (JSLink) gets ignored when switching views (BUG)

$
0
0

I made a custom field with JSLink and custom Rendering.

Everything works fine when the page is rendered, until I browse to another view in the list (or even the same), i.e. clicking in the link bar above the list view. Switching between the views causes the view to re-render, without my handlers being called, it simply uses the base type rendering (although allowbasetyperendering is set to false).

This renders CSR completely useless - how do I get around that?

(I wanted to submit a Picture but apparently I'm not verified)

Update: The issue is not limited to switching views, it also occurs when navigating (apparently only pieces of the page are rendered (UpdatePanels or whatever) and this re-rendering doesn't care about custom field rendering).

Update: I confirmed the behaviour by installing out-of-the-box custom field (site column only), both MS samples as well as Solutions from other developers. They all work as intended, until I'm navigating on the page (switching views or using the left side bar) - page gets re-rendered partially and all customizations vanish.


Help with deploying search display templates

$
0
0

Hi guys

I am deploying some html files to the display templates\search folder of a SharePoint publishing site using a module which is as follows:

  <Module Name="_catalogs" Path="_catalogs\masterpage" Url="_catalogs/masterpage">

    <File Path="Display Templates\Search\Control_SlideImage.html" Url="Display Templates/Search/Control_SlideImage.html" Level="Draft" ReplaceContent="TRUE" Type="GhostableInLibrary">

      <Property Name="FeatureId" Value="$SharePoint.Feature.Id$" Type="string"></Property>

    </File>

    <File Path="Display Templates\Search\Item_SlideImage.html" Url="Display Templates/Search/Item_SlideImage.html" Level="Draft" ReplaceContent="TRUE" Type="GhostableInLibrary">

      <Property Name="FeatureId" Value="$SharePoint.Feature.Id$" Type="string"></Property>

    </File>

  </Module>

I also have a feature receiver event that uses the $SharePoint.Feature.Id$ value of these files to search for them and to update and publish them. This way the associated js file gets generated for those html files.

My problem is this worked fine when I deployed the html files for the first time. But then when I changed an html file and redeployed, my change did not appear in the deployed html and the associated js file in the search folder.

I have tried deleting the old versions of those files from the search folder and all the bin folders I could find in the site collection and tried again but I am still getting the original version of those files.

Any solution is appreciated.

Regards

Seemorgh


How do I track versioning in code?

$
0
0

Is there a way to programmatically capture and keep track of the version of a document in a library, and also track minor and major versions? I have never had to do this before and I have not seen any blog/post to point me in that right direction. Has anyone had any luck doing this before, or have an idea of something I can take a look at to get this done?

I really appreciate the help.

Error while SSRS configuration.

$
0
0

Dear All,

I have activated and installed the SSRS through Central Administrator.

When I click on Site Setting -> Reporting Services -> Reporting Services Site Setting I am getting following error.

Can anyone please help me how to resolve the issue ?

Error:

An unexpected error occurred while connecting to the report server. Verify that the Reporting Services Service Application mapped to this web application is available OR the report server is available and configured for SharePoint Integrated mode. --> The content type text/html; charset=utf-8 of the response message does not match the content type of the binding (application/soap+msbin1). If using a custom encoder, be sure that the IsContentTypeSupported method is implemented properly. The first 1024 bytes of the response were: '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml"> 
<head> 
<title>IIS 8.0 Detailed Error - 500.19 - Internal Server Error</title> 
<style type="text/css"> 
<!-- 
body{margin:0;font-size:.7em;font-family:Verdana,Arial,Helvetica,sans-serif;} 
code{margin:0;color:#006600;font-size:1.1em;font-weight:bold;} 
.config_source code{font-size:.8em;color:#000000;} 
pre{margin:0;font-size:1.4em;word-wrap:break-word;} 
ul,ol{margin:10px 0 10px 5px;} 
ul.first,ol.first{margin-} 
fieldset{padding:0 15px 10px 15px;word-break:break-all;} 
.summary-container fieldset{padding-bottom:5px;margin-} 
legend.no-expand-all{padding:2px 15px 4px 10px;margin:0 0 0 -12px;} 
legend{color:#333333;;margin:4px 0 8px -12px;_margin- 
font-weight:bold;font-size:1em;} 
a:link,a:visited{color:#007EFF;font-weight:bold;} 
a:hover{text-decoration:none;} 
h1{font-size:2.4em;margin:0;color:#FFF;} 
h2{font-size:1.7em;margin:0'. --> The content type text/html; charset=utf-8 of the response message does not match the content type of the binding (application/soap+msbin1). If using a custom encoder, be sure that the IsContentTypeSupported method is implemented properly. The first 1024 bytes of the response were: '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml"> 
<head> 
<title>IIS 8.0 Detailed Error - 500.19 - Internal Server Error</title> 
<style type="text/css"> 
<!-- 
body{margin:0;font-size:.7em;font-family:Verdana,Arial,Helvetica,sans-serif;} 
code{margin:0;color:#006600;font-size:1.1em;font-weight:bold;} 
.config_source code{font-size:.8em;color:#000000;} 
pre{margin:0;font-size:1.4em;word-wrap:break-word;} 
ul,ol{margin:10px 0 10px 5px;} 
ul.first,ol.first{margin-} 
fieldset{padding:0 15px 10px 15px;word-break:break-all;} 
.summary-container fieldset{padding-bottom:5px;margin-} 
legend.no-expand-all{padding:2px 15px 4px 10px;margin:0 0 0 -12px;} 
legend{color:#333333;;margin:4px 0 8px -12px;_margin- 
font-weight:bold;font-size:1em;} 
a:link,a:visited{color:#007EFF;font-weight:bold;} 
a:hover{text-decoration:none;} 
h1{font-size:2.4em;margin:0;color:#FFF;} 
h2{font-size:1.7em;margin:0'. --> The remote server returned an error: (500) Internal Server Error.

Thanks,

Harish Patil

PowerShell script to create Document Library with a hyperlink field

$
0
0

I am working on a PowerShell script to create a new Document Library for a site, however, I need to add a hyperlink field. How would I go about coding that? I think the internal field name is "fileref".

Here is my current code which creates 1 text field.

$webURL=“http://xyz/sites/intranet/abcsite"

$spSite=[Microsoft.SharePoint.SPSite]($webURL)

$spWeb=$spSite.OpenWeb()

# Create a document library (ID is 101)

$myListGuid=$spWeb.Lists.Add(“riskmgmt”,“Risk Management”,101)

$myList=$spweb.Lists[$myListGuid]

#

# Update the List Title

$myListObj=$spWeb.Lists["riskmgmt"]

$myListObj.Title=“Risk Management”

$myListObj.Update()

#

# Adding fields

$myFieldCustomerName=$myList.Fields.Add(“Procedure”,“Text”,0)

$myList.Fields[$myFieldCustomerName].Title=“Procedure Title”

$myList

.Fields[$myFieldCustomerName].Update()

$spWeb.Dispose()

$spSite.Dispose()


If I go into the library settings and manually update the columns I would need to add they hyperlink field which includes the URL and the description. How do I get the same results, but through PowerShell?

How to remove views links below the list webpart?

$
0
0

Hi All,

I want to remove views links which shown below the list,

Here, want to remove the div of "All items, test, Status_Action". How to do this?

How to increase more items to be shown in a list page?

$
0
0

HI All,

After I group list view by "Workflow Status" column, it shows only 4 item in first page and remaining in second page only. How to have all rows in same page?

Thanks,

Accessing web.config from server not running Foundation Web Application service?

$
0
0

The scenario is that I have a solution deployed to Central Administration (Web Application-scoped). The solution modifies the web.config of the target Web Application, modifying existing entries.

However, if the Foundation Web Application service is not started on the server hosting Central Administration, how should I go about accessing the web.config to read the existing values? I end up getting a "File not found" error message in this scenario.


Trevor Seward

Follow or contact me at...
&nbsp&nbsp

This post is my own opinion and does not necessarily reflect the opinion or view of Microsoft, its employees, or other MVPs.


SearchResults layout issue in enterprise search center.

$
0
0
I just checked  searchResults.aspx in Sharepoint designer and without making any changes saved the layout,But after that,All the pages which is using this layout is giving me an error "An error occurred during the processing of /sites/EnterpriseSearch/_catalogs/masterpage/searchresults.aspx. Code blocks are not allowed in this file." I tried changing the version to previous but it still gives me the same error.Is there anyway to make this layout work as before?Any pointers will be helpful.

Multiple login prompt for SharePoint-hosted app

$
0
0

Hi,

I knew that Tony already asked the question for provider-hosted app here. However, the issue is worst for SharePoint hosted app. Let's take the following scenario:

  • I installed 4 apps to a SharePoint site.
  • For each app, I add the app part to the site's homepage.
  • Since each app has a separate URL (ex. http://app-{appid}.appdomain.com), the login prompt will appear 4 times, one for each app. 

This is not ideal for the end users, especially if this is an Intranet but hosted in Office 365. The best solution I have so far is

  • Add the wildcard app domain URL (ex. http://*.appdomain.com) to the Intranet Sites in IE
  • After that, for each login prompt, enter the username/password and check "Remember my credential". This will save the entered credential for EACH app to the credential manager.
  • Every new app I add later, the user will get login prompt again at least once.

Is there any better solution than this?

Regards,

Phi

How to filter task from task list according to the current users?

$
0
0

Hi All,

I need to filter tasks from the task list according to the logged-in user. If a user logged-in, he should see tasks which he involved. How to achieve this scenario?

Getting Access denied exception while updating listitem using Rest API

$
0
0

Hi,

I am having an external application that uploads a document to sharepoint using REST API. Here i am getting access denied while uploading the document

Do we need to send the accesstoken via rest request. If so how to send the access token.


Thanks in advance

Mani

How do I get the FieldKey value?

$
0
0
If I have a column called "My Column", how do I get its FieldKey value, in code? Dumb question, I know...but am going blank, so I really appreciate the help.

Sharepoint fail

$
0
0
When will Iget mySharepoint2013sitewithin anotherpagethe following messageappears:

"To help protectthe security of informationyou enterthis site, the providerof this contentdoes not allow thecontent to be displayedin a frame."

Has anyone seenthis, asI canmake it work?

Custom Page layouts in SharePoint2013 using visual studio2012

$
0
0

Hi,

I want to create a custom page layout using visual studio2012 and i need to deploy it to SharePoint 2013. can anybody help on this.

Thanks in advance.

Regards,

Venu


How do i programmatically get the current version of a file?

$
0
0
How do I programmatically obtain both the major and minor versions of a file in a library? I want to be able to get the value of the current version and concatenate that to another field. So my challenge is really how to get the current version of the file.

Input Mask for a text box

$
0
0
I know we can use masked text box in windows form. However, this control is not available in visual web part. I would like to set up a input mask for a textbox as "99-99". Can anyone give me some help? Thanks

SharePoint online edit masterpage

$
0
0

Hi,

I want to add JavaScript Code the seattle.master in the sharepoint online

<script src="https://code.jquery.com/jquery-latest.min.js" type="text/javascript"></script>
<script>
$(document).ready( function() {
    $("#sideNavBox").css("display", "none");
    $("#contentBox").css("margin-left", "20px");
    $("#s4-titlerow").css("display", "none");
    $("#s4-ribbonrow").css("display", "none");
    $("#suiteBarDelta").css("display", "none");
})</script>

I want to add this code to the masterpage via SharePoint Designer 2013. I am able to save the masterpage but the code is neither running nor available in the Developer tools. Is there a Cache problem? If I am downloading the masterpage I can see the changes but they are not running.

WCF Service with MultipleBaseAddressDataServiceHostFactory used shows "Endpoint not found."

$
0
0

Using many manuals in the Net, I've created wcf service to be published in Sharepoint (like  ere: http://blog.sharepointbits.com/2010/04/custom-wcf-services-in-sharepoint-2010_17.html or here: http://sivarajan.me/post/SharePoint-2013-Responsive-WebPart-using-Knockout-with-WCF-REST-Service). It deploys, but .svc and .svc/mex gives me only "Endpoint not found." error.

What should I change for it to work?

Code is like this:

Service.svc:
<%@ServiceHost
     language= "C#"
     Service="Service, $SharePoint.Project.AssemblyFullName$"
     Factory= "Microsoft.SharePoint.Client.Services.MultipleBaseAddressDataServiceHostFactory, 
    Microsoft.SharePoint.Client.ServerRuntime, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c"%>

IService.cs:
[ServiceContract]
public interface IService
{
[OperationContract]
bool Method1(CustomObject[] objects);

[OperationContract]
bool Method2(AnotherCustomObject object);

[OperationContract]
bool Method3(AnotherCustomObject object);

[OperationContract]
bool Method4(int ID);
}

Service.cs:
[BasicHttpBindingServiceMetadataExchangeEndpointAttribute]
[AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Required)]
public class Service : IService
{
public bool Method1(CustomObject[] objects) {...}

public bool Method2(AnotherCustomObject object) {...}

public bool Method3(AnotherCustomObject object) {...}

public bool Method4(int ID) {...}
}

Newbie dev question - adding columns to content type

$
0
0

OK, so I have a test dev project where I've created a few site columns, added them to a custom content type, and then created a list with this content type.

Everything is going fine, except when I want to make some changes. I want to add a few more site columns and add them to the content type.

If I make the changes and try to re-deploy from visual studio, it wants to delete and re-create the list, which would be undoable in a production environment.

If I package the solution as a wsp and deploy it using update-spsolution, it doesn't seem to actually change anything. The new site column is not there and the content type is unchanged.

What am I missing?

Viewing all 7589 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>