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

Problem with ExecuteOrDelayUntilScriptLoaded with ScriptForWebTaggingUI.js when initializing Managed Metadata Fields in UI

$
0
0

Currently I'm porting an existing SharePoint 2010 solution to SharePoint 2013. Currently I'm struggling with a small javascript issue. The javascript is a small routine which disables some managed metadata fields to prevent users to change those fields within a custom page opened in a dialog. Currently we run a method at page load which initializes this by using the method ExcuteOrDelayUntilScriptLoaded(InitFieldsMethod, "ScriptForWebTaggingUI.js"); In SP2010 this part of code was working. What it actually does is that it executes our initialization method after the rendering and initialization of the metadata controls was done (this was done in SP2010 by ScriptForWebTaggingUI.js). In SP2013 it seems that this method doesn't work anymore.

When I use this code the initialization method gets called to early, because the rendering of the metadata fields hasn't done yet. What I've tried is to place the ExcuteOrDelay routine later in the page or bind it to other js files like sp.js. But all of these variants didn't work properly. Does somebody know what I can do to force that the initialization code runs after the metadata fields have rendered properly? The code itself still works, which I've verified by using the developer toolbar in IE 8 and then call the initialization from console manually after proper loading of the page.


Convert SharePoint CSS into Javascript

$
0
0

Hi Everyone!

To start, I'm not a developer which is why I'm here.  I have a quick need to convert this SharePoint CSS into javascript:

<style type="text/css">
.theme-entry .tab-box ul.tab-box-tabs a.selected.tab {
    border-color: #FFDF00;
    color: #262626;
    height: 28px;
}
.theme-entry .tab-box ul.tab-box-tabs a.selected.tab .tab-text {
    color: #262626;
    height: 28px;
    font-family: Arial;
}</style>

I'm guess that it would start and end like this, but I have no clue about the middle.

<script type="text/javascript"><!--

//--></script>
Any help would be appreciated.  Thanks!

Is there any utility that can give you the speed of specific functions in a SharePoint c# Soution?

$
0
0

Hi,

I have taken over someone's code which is a C# Farm Solution for SharePoint 2013 On-Premises.  Users have been experiencing serious degradation on page loads (which contain three web parts). As the list becomes bigger so the system gets slower. I am pretty sure this is related to queries on the list. However, there are a hell of a lot of queries on this system and I just wanted to know is there a utility in-built in VS or third-party which provides you with functions and their speeds so I can nail it down.

I have looked at Developer Dashboard that there are a few large SQL Queries, but not sure in what functions they reside.

Can anyone help?

Thanks.

John.    

How to get the Sql storeprocedure to sharepoint 2013 online

$
0
0

Hi ALL,

Can any one please help me how can i get the sql store procedure data to SharePoint2013 online.

We dont want to keep the data in Sql Azure Database because of security issue.

Please let me know.

Thank you,

Sowjanya. 

Assign enterprise license to all users in SharePoint 2013

$
0
0

Hello,

Is there any way we assign enterprise or standard license to all authenticated users?

As in below script, can we have "All authenticated users" in place of <yoursecuritygroup>?

$a = New-SPUserLicenseMapping -SecurityGroup <yoursecuritygroup> -License Enterprise

Reference:

https://technet.microsoft.com/en-us/library/jj219627.aspx

My site creation using PowerShell in SharePoint 2013

$
0
0

Hello,

I am creating my site for users in SP2013 using PowerShell script. My script works fine and creates my site for users in some domain but gives me error "a failure has occurred while attempting to create my site" for 2-3 other domains.

I am using script which is referred from: https://social.technet.microsoft.com/Forums/office/en-US/c41a03b6-e62e-4e23-8b0f-5e68a25e8314/script-to-provision-sharepoint-mysites-prior-to-user-login

There are 6-8 domains from where user profiles are synchronized. What could be the possible issue here?

Thank you.

FilterOp support in hash query strings

$
0
0

Hello,

I'd like to know whether hash query string supports the FilterOp parameter. From my test it seems FilterOp is not supported. 

Moreover which parameters do hash queries support? Is there any (OFFICIAL) documentation?

The closest official documentation topic I've found is https://msdn.microsoft.com/EN-US/library/office/microsoft.sharepoint.client.renderlistdataoverrideparameters.filterop.aspx which is API related and I can't consider to be official documentation about hash queries.

Thank you

Emiliano


Emiliano


How to Auto refresh data in Power BI Desktop???

$
0
0

I have installed Power BI Desktop in my machine ..and connected my SharePoint list with it..

I have also created the Graph, Charts using  Power BI..

How Can I automate the data refresh for my dashboard chart, Graph from the SP Lists..

Any Article or Video???

Thanks,


Login from different application to share point site with out any login popup

$
0
0

Hi Everybody,

I have one requirement in my organization.

I have username and password of share point site.

we have to redirect to share point site from asp.net application with out any login popup, Is there any way to login through c# code from asp.net application using share point site credentials(username and password) .

your help is appreciated.

Thanks,

Nag

Workflow for Calendar events

$
0
0

Hi,

I have a calendar with multiple events per day. I want to create a SPD workflow which sends daily email to recipients with details of the events in email. All the events for 1 day should be combined in 1 email . Please provide some guidance on how we can create this workflow.


Amrita Talreja

How to open a term URL (simple link or header) to external site with new browser window(or new tab) in SP 2013

$
0
0

I have SP 2013 external site, which has navigations like Parent - Child.

I wish to refer an external URL through Term Store for a particular term.

The external link should be open in a NEW browser window or new browser tab.

[We can open the external link in same window through Simple Header or Link option]

Let me know if this is possible through Term Store or any other ways.

Please suggest!

Ex:

www.xyz.com/abc  to www.newurl.com (in new browser window)

Deploying Timerjob using powershell - Error: This solution contains no resources scoped for a Web application

$
0
0

Hi,

I have created a Timer job in visual studio 2012. The scope is set to "WebApplication". In the project properties - Assembly deployment target is set to "GlobalAssemblyCache", IncludeAssemblyinPackage is true.

I am trying to deploy the timer job using powershell. I have tried the below:

I have a config.xml file, which contains:

<Config><Solution Path="Customtimerjob1.wsp" GACDeployment="true"><WebApplication>Web application URL</WebApplication><SiteCollection>sitecollection url/</SiteCollection><Features><Feature Name="CustomTimerContentTypeFeature" Scope="Site" Url="site url"></Feature><Feature Name="TimerJob1" Scope="WebApplication" Url="web application URL/"></Feature></Features></Solution></Config>
I have the powershell in which i am reading the config xml file and below command:

Write-Host -f Yellow "Installing the solution : " $name
$sln = get-spsolution -identity $name  -EA 0 -EV Err

if($webApps -ne $null) {

Install-SPSolution -Identity $name -webapplication $webApps -GACDeployment -EA 0 -EV Err
        }
        else
        {
Install-SPSolution -Identity $name -GACDeployment -EA 0 -EV Err
        } 

I am getting the error as "Microsoft.SharePoint.SPException: This solution contains no resources scoped for a Web application and cannot be deployed to a particular Web application".

I am able to deploy the application directly from visual studio, however, i need to use the powershell to deploy in other environments.

I have also tried the solution given in https://ybbest.wordpress.com/2012/11/17/how-to-fix-error-this-solution-contains-no-resources-scoped-for-a-web-application-and-cannot-be-deployed-to-a-particular-web-application/  , but the issue is still there.

How to fix this?

Thanks


PowerShell for Document Library permissions

$
0
0

Hello, I have a Site Collection with many subsites.  Each subsite has a document library with the same name and would like to have the same unique permissions set.

To make it easy, the site collection is called Years

https://domain/sites/years/

subsites 2000, 2001...2016

so https://domain/sites/years/2016/Four Quarters/ there is a space (darn it) in each Document Library such as "Four Quarters"

Inherited permisisons should be be removed and then any permissiosn listed, should be removed and replaced with a few, such as "Domain Admins - Contribute" and "Domain Users - Read" for instance, on each Document Library (only one in each subsite).

I do NOT need to use something like this PowerShell below, however it MAY be helpful.  I do NOT know PowerShell and I saw this and wondered if it might help with getting the subsites, however, after that I don't know how to get the Document Library and then set the permissions.

start-transcript c:\PowerShellScripts\Proposals\dailyProposalstranscript.txt
rm c:\PowerShellScripts\Proposals\allsites.txt
rm c:\PowerShellScripts\Proposals\allsitesnq.txt
Add-PSSnapin Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue
Get-SPsite -identity https://WebApplicationqa/depts/SiteCollection/ | get-spweb -Limit All | select url | export-csv -path c:\PowerShellScripts\Proposals\allsites.txt -NoTypeInformation

Get-Content c:\PowerShellScripts\Proposals\allsites.txt | % {$_ -replace '"', ""} | Set-Content c:\PowerShellScripts\Proposals\allsitesnq.txt
Get-Content c:\PowerShellScripts\Proposals\allsitesnq.txt |  Where { $_ -Match "https://WebApplicationqa/depts/SiteCollection/" } | Set-Content c:\PowerShellScripts\Proposals\allsites.txt

Thank you! Please let me know (obviously) if I need more information or if this isn't clear.

a site collection with subsites all with the same named document library need unique permissions set on it, there are permissions already on it, and they need to be removed and specific permissions applied for each subsite's Document Library named "xyz"

WebPart Issue on SP 2013 - 500 Internal Server Error accessing .aspx pages in the site _layouts folder

$
0
0

Hi All,

I'm having a very strange issue that I have been unable to resolve for several weeks.  I have a Web Part developed against SP 2007 and 2010 that is having an issue running under 2013.  This Web Part displays a list of items retrieved by calling a web service and has an option to view the detail of an item in the list.  Selecting this option calls a detail aspx page that is installed in a folder we create during the installation process in the "_layouts" folder.

I can add the Web Part to a page and it successfully calls the Web Service and displays the list of items.  So far, so good.  However, when I click the option to display the item detail, I get a "500 - Internal Server Error".  Hoping to get more details on the cause, I setup the site config file (turned off customErrors and turned on the debug setting) but that didn't give my any additional error information.  I then setup the site in IIS to log 500 errors but that didn't help either.  The server event log was also of no use.

Knowing that the Web Part works on SP07 and SP10, I created a site collection using the "2010 Experience" setting, added the Web Part to a page on that site and it worked fine.  I thought this was interesting so, I created another "2010 Experience" site collection and added the Web Part to it, made sure it worked correctly and then converted that site to a 2013 site and the Web Part worked fine on that site as well.  At this point to summarize, I have a working Web Part under 2013 if I add it to a page for a "2010 Experience" site or for a "2010 Experience" site that is converted to a 2013 site but not on a "native" 2013 site.

Looking and the urls I noticed that for the 2010 and the 2013 converted site (again converted from a 2010 experience site) look like this when accessing the detail page when that option is selected:

http://mysharepointserver:9402/sites/EventListWebPartTest/_layouts/compulaw/eventdetailpage.aspx?uri=55523

But for the native 2013 site collection the url looks like this:

http://mysharepointserver:47448/sites/EventListWebPartSP13/SitePages/_layouts/compulaw/eventdetailpage.aspx?uri=55523

Examining the urls I noticed that the 2013 site adds "/SitePages/" to the url.  If I remove that and change the url to this:

http://mysharepointserver:47448/sites/EventListWebPartSP13/_layouts/compulaw/eventdetailpage.aspx?uri=55523

The detail page displays (although the page styling is messed up).

I suspect the issue is with the injection of “SitePages” into the url.  I tried changing the code and calling Page.ResolveUrl instead of using a relative path to the aspx pages in the _layouts folder but with the same result.  I even tried replacing one of the aspx pages with a blank one but I still get the 500 error.  It’s obvious that IIS is having an issue accessing the _layouts folder for the site and throwing the error but isn’t including any details on the cause.

Fiddler shows that I get a “401” error just before the “500” error.  But apparently this is normal for the security model I selected when the site was created (NTLM, Claims Based Authentication).  I get the “401” on the other sites as well which doesn’t seem to cause any problems there.  The IE and Chrome dev tools aren’t helping me either as they only show the 500 but no additional information indicating the cause.

I’m at a complete loss as to what is going on here or what to try next.  Does anyone have any ideas what I'm doing wrong or what I can try next?  I've been all over the web looking for some direction but nothing has panned out.  Any help would be greatly appreciated.

Check If Pages exist in Page library using JSOM/REST

$
0
0

I wold like to pass more than one page names as input parmeter in the Page library and get the result whether those pages exist or not (Pages might reside inside folder as well) using JSOM or REST. can anyone explain?

Thanks in advance.


Understanding SharePoint web application vs. physical data representation

$
0
0

Hello guys,

Today I wanted to understand what exactly IIS does, when I call a SharePoint site and how URLs are redirected. So I went to the IIS manager and figured, that when I open my website I can see the following folder structure:

_app_bin
_controltemplates
_layouts
_login
_vti_bin
_vti_pvt

...

But when I map a network drive to my SharePoint-root-site, I get a totally different structure (the one what probably comes from the Database)

asf
Cache Profiles
data
DeviceChannels
FormServerTemplates
images
IWConvertedForms
knowledge
...

I would like to understand how this folder structure is created in IIS? Its not a virtual directory, right? Also there is no physical representation on the server HDD of this file tree. Can somebody explain how this works? I only want to get a short overview of what happens, when I navigate to the different SharePoint-URLs.

To summarize my questions:

Question 1: Where is the entry point of a SP-Website? In Apache this was my index.html, but how about SharePoint? There is only the web.config in the root, nothing else. 

Question 2: How can the connect to network drive function work, even though I did not enabled any WebDAV service? Which service on the server is responsible for that?

Thanks,
David






Anonymous Access Enabled and still getting Login Popup

$
0
0

Hi All,

I have created a sub-site with anonymous access for all users in a site collection, but still while opening sub site it is showing  popup for login.

Can any one help me to out from this problem.

as per the scenario it should not open any popup once we enable the anonymous access to the user. it should redirect to particular page without any login popups

 Thanks,

Nag

winform / C# .Net 4.5 and adfs

$
0
0
Hello,

   I'd like to find some help.

   The context:

   I need to read some data stored into a sharepoint (2013) list from inside my (C#) code which is a winform (using .Net 4.5).

   I've already done such thing quite easily. But this time the sharepoint I'd like to reach uses ADFS.

   I've found some explanations on the web but not for the purpose described just above.

   To be more clear I do not try to authenticate the user running the winform appli with adfs, but I try to connect to a sharepoint list using ADFS with credentials put in some config file, not necessarily the same as the current user running the winform application. 
   
   In other words I'd like to be able to connect through ADFS at any point of the code with differents credentials token from either a config file or event using credentials entered by a user through a popup form in my winform appli dynamically.

   Could anybody give me some resources (code?) or advices on this topic?

Kind regards.
Claude


                  

SharePoint 2013 -Single JS Link for Multiple Views of a list

$
0
0
Am working on a List choice field UI manipulations and able to get as per my need using JS Link for a list view but the same needs to be applied for more than one view and i want to do that without adding one more JS Link to other views.Is it possible to do OOB? I know custom field will help but wanted to achieve with the existing OOB Field? Please suggest for some ideas, thanks in advance!

Praveen Mandalapu

How to write a jquery ajax REST api function to create a list in SP2013?

$
0
0

I am trying to create a list in SP2013 REST. This is what I get

   var url = "http://mysite/_api/web/lists";

   $.ajax({
       url: url,
       type: "POST",
       contentType: "application/json;odata=verbose",
    body: {
     '__metadata': {
      'type': 'SP.List'
     },
     'AllowContentTypes': true,
     'BaseTemplate': 100,
       'ContentTypesEnabled': true,
       'Description': 'My list description',
       'Title': 'Test123'
      },
       cache: false,
       headers: {"Authorization" : "Bearer123","X-RequestDigest": $("#__REQUESTDIGEST").val(),"Accept": "application/json;odata=verbose","content-type": "application/json;odata=verbose","content-length" : 800
    },
       beforeSend : function(jqXHR, settings) {

       },
       success: function (data) {
        alert(data);
       },
       error: function (jqxr, errorCode, errorThrown) {
        alert("Failed");
       }
   });

But it doesn't seem to work. The MSDN page is not that helpful since it doesn't give a jquery example, and I can't find any good examples anywhere.

https://msdn.microsoft.com/en-us/library/office/dn292552.aspx

Does anyone know to do it?

with the above, it seems to be returning

    "{\"error\":{\"code\":\"-1, Microsoft.SharePoint.Client.InvalidClientQueryException\",\"message\":{\"lang\":\"en-US\",\"value\":\"A node of type 'EndOfInput' was read from the JSON reader when trying to read the start of an entry. A 'StartObject' node was expected.\"}}}"

Thanks

Viewing all 25064 articles
Browse latest View live


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