mercredi 31 décembre 2014

Access Denied after Change Form Authentication To Disable



I got Access denied if I change Form Authentication To Disable while am in Owner Group of Sharepoint.


and when I put enable it's work fine.






Different sets of options in a lookup or choice column depending on the content type



I have a list content type and other content types that derive from it. I need to add a lookup or choice column to the content type (or the list itself) just so that each child content type or list has separate set of options.


For example the parent content type is Assets. The content types deriving from it are Computers and Furniture. I need to add a column named "Asset_Type" that will list "Desktop, Laptop, Tablet" if the content type is Computer and it will list "Table, Chair, Desk" if the content type is Furniture.


I tried various scenarios with site columns but everytime ended up overwriting the parent column options and vice-versa. What should I be doing to make it work?






Authenticate to Sharepoint Online/Office 365 with cURL



I am currently trying to develop a PHP application that checks whether or not a folder exists in a SharePoint directory. While I have managed to submit the right REST requests when logged in inside the browser, my problem is authenticating using URL.


There are a two requirements to this:



  1. I do not have Admin access to our SharePoint subscription so I cannot register apps

  2. I can only use an existing user account and authenticate with email/password.


I have found several tutorials and even thybag's PHP library for SharePoint. None of these things work and I assume there has been a change in the authentication method. I am still able to get the Binary Token from Microsoft's Server but sending it to the SharePoint server doesn't work.


Is there a way to solve this problem?






Unable to update the User Information list using Powershell



I am using the following Powershell script for updating User Information Lsit in SP2013 environment. I am a member of Administrators group and also Site collection administrator.



$Site = Get-SPSite "http://ift.tt/1iWOj68"
$web = $Site.RootWeb

$list = $web.Lists["User Information List"]
$query = New-Object Microsoft.SharePoint.SPQuery
$query.Query = "<Where><Contains><FieldRef Name='Name' /><Value Type='Text'>Amit.Tyagi@something.com</Value></Contains></Where>"
foreach ($item in $list.GetItems($query))
{
$item["Department"] = "Marketing Department"
$item.SystemUpdate()

"Name = " + $item["Name"] + " :: Department = " + $item["Department"]
}


The script is running successfully on DEV and TEST environments. But on my production environment i am getting following error for $item.SystemUpdate() statement,



Exception calling "SystemUpdate" with "0" argument(s): "0x80070005" At D:\Solution\UserProfileUpdation\testscript.ps1:12 char:9 + $item.SystemUpdate() + ~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : NotSpecified: (:) [], MethodInvocationException + FullyQualifiedErrorId : UnauthorizedAccessException







Infopath forms not added to central admin after deploying workflow



I am making changes to several SharePoint state machine workflows that each contain Infopath forms for the workflow tasks. I have been able to deploy all but one of them successfully. The problem I am having is that the forms in the workflow are not pushed to the Manage Form Templates section of Central Admin. For all the other workflow projects, installing the workflow using a .bat file worked fine, and updated the form templates.


The first time I tried to deploy this workflow, the forms did not change at all in CA. I saw errors when attempting to upload new versions manually ("The following form template cannot be upgraded because it is not currently uploaded on this farm"). I uninstalled the feature that contained the forms, which deleted them, but on all subsequent deploys of completely new versions/GUIDs for everything, the forms don't get add to the template list in CA. If I try to upload the templates manually in CA, the forms have a value of No for Workflow Enabled, which prevents me from opening them in SharePoint.


I have researched for many hours with no solution. I have read and completed step-by-step the following articles:



The structure of my project folder in 14/TEMPLATES/FEATURES is:



  • Forms folder (includes all .xsns, elements.xml and workflow.xml)

  • Workflow1 folder (includes elements.xml)

  • Feature.xml


If anyone could give advice that would be great.






Double replacement for site collection replacement token in master page?



I am setting up custom branding for a site, using a custom master page, and linking to custom css, image and script files all hosted in the Style Library on the root web of the site collection.


As suggested in this answer, I am using the replacement token ../.. to refer to the site collection. So, for example, some of my links look like this:



<link href="../../Style Library/custom/css/custom_v2.css" rel="stylesheet" type="text/css"/>
<asp:Image ImageUrl="../../Style Library/custom/img/logo3.png" runat="server" />


This works fine for the home page of the site, and for any main list view for any of the lists or libraries on the site. However, if I go to a "system" page, like Site Contents or Site Settings, everything gets broken, and I can see that my links have turned into this:



<link href="../../sites/mysite/Style Library/custom/css/custom_v2.css" rel="stylesheet" type="text/css"/>
<asp:Image ImageUrl="../../sites/mysite/Style Library/custom/img/logo3.png" runat="server" />


So it seems as though the URL replacement is happening twice in those cases. Why is this happening, and is there anything I can do about it?


(The same custom master page is specified for both SPWeb.MasterUrl and SPWeb.CustomMasterUrl.)






WorkFlow creates .zip file instead of word document



I am trying to create a WorkFlow that takes user information from an InfoPath form and creates a word document in a separate library. As of right now my workflow creates an item in the library with the proper name but it is creating a .zip file.


Any idea as to why this would happen, and how to fix the issue?


Links to tutorials I used to get this far:


Technet


SharePointGuru






Can you change Welcome Page Web Part Settings?



Lets say you have a Document Set, with a Web Part on it's Welcome Page. Let's say it has some custom settings (like a list name that it interacts with). Can you edit those settings like you would a web part placed on a normal page? Would/could you do this from any particular item's welcome page? Or is there some special way to access the generic "welcome page" for the content type?






Powershell - get a list of all the document libraries for a web application including content types - output to csv



I have following code and it works great. However, business unit now wants to see content types for each document library. Most document libraries come with Document and Folder content types. Now, there are some libraries which has 5 or 6 different content types. I need to provide a csv with 1 row for document library (name, url, content types). The content type column should have all the content types in it. I can't get the content type exported to csv. When I do write-host on the content type (write-host $ct) I can see it has all the content types belong to a document library. I understand $ct is an array object and it may need to be handled specially in order for add-content to accept it's data. Any idea how to do this?



#For Output file generation
$OutputFN = "Libraries.csv"
#delete the file, If already exist!
if (Test-Path $OutputFN)
{
Remove-Item $OutputFN
}
#Write the CSV Headers
Add-Content $OutputFN "Web URL, Site Name, Library Name, Content Types"

$systemlibs =@("Converted Forms", "Customized Reports", "Documents", "Form Templates",
"Images", "List Template Gallery", "Master Page Gallery", "Pages",
"Reporting Templates", "Site Assets", "Site Collection Documents",
"Site Collection Images", "Site Pages", "Solution Gallery",
"Style Library", "Theme Gallery", "Web Part Gallery", "wfpub")

#Get the Site collection
$Site= Get-SPSite "http://ift.tt/13TieJF"
$spWebApp = $Site.WebApplication
foreach($allSites in $spWebApp.Sites)
{
#Loop through all Sub Sites
foreach($Web in $allSites.AllWebs)
{
#Write-Host "-----------------------------------------------------"
#Write-Host "Site Name: '$($web.Title)' at $($web.URL)"
#Write-Host "-----------------------------------------------------"
foreach($list in $Web.Lists)
{
if($list.BaseTemplate -eq "DocumentLibrary" -and $list.AllowContentTypes -eq $true)
{
if(-not ($systemlibs -Contains $list.Title))
{
if ($list.AllowContentTypes -eq $true)
{
$ct = @()
foreach ($contenttype in $list.ContentTypes)
{
$ctProperties = @{ContentType = $contenttype.Name}
$ctObject = New-Object PSObject -Property $ctProperties
#write-host $ct
$ct += $ctObject
#write-host $ct
#Write-Host "$($web.URL), $($web.Title), $($list.Title), $ct"
}
#$ct
write-host $ct

#Write-Host "$($web.URL), $($web.Title), $($list.Title), $($ct)"
#$content = $web.URL + "," + $web.Title +"," + $list.Title +"," + $ct
#add-content $OutputFN $content
}
}
}
}
}
}





Infopath 2010 InfoPath cannot load the view. The view may have been modified to contain unsupported HTML such as frames



Suddenly, all my infopath 2010 forms are throwing this error when I open them in design mode.


I only use the UI to design forms, no custom HTML.


I think the problem is local to my machine, but I wonder if anyone has seen this before?






Is High-Trust required for Provider-Hosted apps?



I setup a development environment and have the subscriptions service and app management service running. I can create and deploy sharepoint-hosted apps just fine. When I try to create a provider-hosted app, the app will deploy, but I get a 503 error from fiddler when I try to access the app.


Is there a way to setup provider hosted apps without using certificates? What is the benefit for an intranet environment with no public facing sites?






Error when creating a site collection with SharePoint 2013



Currently, I have 1 server 221 for WebFrontEnd, 1 server 222 for WebBackEnd.



  1. After I created a new web application with port 90 in the server 221, I tried to create a site collection but I got into a problem as picture 1.

  2. Then, I tried to create a site collection in the server 222, yet it got another issue as picture 2.


What I have done here is that I have tried to modify the CustomErrors mode from Off to RemoteOnly. However, for 2 servers and all paths below, I only got CustomErrors mode with On.



  1. C:\Program Files\Common Files\microsoft shared\Web Server Extensions\15\TEMPLATE\LAYOUTS\web.config

  2. C:\Program Files\Common Files\microsoft shared\Web Server Extensions\15\TEMPLATE\ADMIN\web.config

  3. C:\inetpub\wwwroot\wss\VirtualDirectories\90


Please let me know how to address the problem.


Picture 1:


pic 1


Picture 2:


pic 2






List View Web part not showing all available views for list



We have added a list view web part to a page, and we get the Current View link in the web part. Which is configurable when modifying the actual web part.


What we'd like to see (instead of having to click the ellipses button/context menu to get the other views) is the views displayed horizontally like when you are viewing the list itself.


When viewing the list itself, we see All Items View 1 View 2, etc.


Is this possible in the list view web part to display all available views in a horizontal/breadcrumb layout? Please advise.


Trying this in simple webpart code snippet, but not responding:



<script>
function showMeViewsJS(){

var viewCollection = null;
function runCode() {

var clientContext = new SP.ClientContext.get_current();
if (clientContext != undefined && clientContext != null) {
var web = clientContext.get_web();

var listCollection = web.get_lists();
var list = listCollection.getByTitle("Students");
this.viewCollection = list.get_views();

var viewInfo = new SP.ViewCreationInformation();
viewInfo.set_title('MyView');
this.viewCollection.add(viewInfo);

clientContext.load(this.viewCollection);
clientContext.executeQueryAsync(Function.createDelegate(this, this.onQuerySucceeded), Function.createDelegate(this, this.onQueryFailed));
}
}

function onQuerySucceeded() {
var viewInfo = 'Tasks list current views: \n\n';
var viewEnumerator = this.viewCollection.getEnumerator();
while (viewEnumerator.moveNext()) {
var view = viewEnumerator.get_current();
viewInfo += view.get_title() + '\n';
}
alert(viewInfo);
}

function onQueryFailed(sender, args) {
alert('Request failed. ' + args.get_message() + '\n' + args.get_stackTrace());
}

}
</script>
<a onclick='return showMeViewsJS();'>Click here</a>





mardi 30 décembre 2014

Show Live Document Library by QueryString



I am trying to build a page in which I can then add a Query String to pull the specific document library, showing all of the folder and files in it. Then from there I am going to create a webpart (using sharepoint developer) to show that library on another page that has multiple webparts. I am running into problems figuring out how to use the page to create the query string needed. Anyone have suggestions?






GetChanges REST call from java returning status 400



I'm trying to use the GetChanges REST API call in SharePoint 2013 from a standalone Java app using Apache HttpClient. The JSON body in the POST request body looks like this:



{"Web":true,"query":{"__metadata":{"type":"SP.ChangeQuery"}},"Update":true}


which matches the sample at:


http://msdn.microsoft.com/en-us/library/office/dn499819%28v=office.15%29.aspx


I'm setting the Accept and Content-type headers to:



"application/json;odata=verbose"


and also setting the X-RequestDigest header to the FormDigestValue from the contextinfo request.


But I get back a 400 response with this message:



"The parameter Web does not exist in method GetChanges."



If I omit the Web and Update properties from the request there is no error but I get an empty results array.






Edit ribbon gone when trying to edit SharePoint 2013 list item



I have a list in SP that has been working fine. I am the admin and have complete full control to the whole site.


When a user that has been given "Edit" permissions to this specific list clicks on the column name that I have linked to the item, the Edit ribbon is completely gone (The ribbon that shows "Edit Item", "Version History", "Shared With", "Delete Item" etc.)


When logged in as myself, I see this ribbon, but when the user who has edit permissions for this list is logged in, they do not.


I have added the "Edit" column to the list to see if they will be able to edit the item. And this column does allow them to edit the item. Yet the ribbon is still missing.


One of the biggest reasons I need this ribbon is so users can add attachments to already created items.


Anything you can do to help would be great.


Thank you






SharePoint 2010 Publishing Images



SharePoint 2010 - Cannot download or view some image files on the publishing images folder. Some images opens fine but some does not. There is no error on the logs as well.


The library ribbon is not showing up as well. When I click on the edit page, the ribbon does not show at all.






SharePoint 2013 wiring together 3 custom lists



In a SharePoint 2013 new project that I will be working on, I am creating a custom list initially for users to pick what items that they need before clicking the submit button where a workflow will be initiated. When I have completed the custom list, I am going to edit the applicable form(s) with InfoPath 2013 designer.


Since this is the first SharePoint 2013 project that I have ever worked on, I have the following questions to ask you:



  1. Is my planned way of working with SharePoint 2013 the preferred method? If not, would you tell me what the preferred method is and tell me and/or point me to a url that will show me how to use the preferred method?

  2. In the custom list, the user will need to obtain the values for Customer Name and Contact Name from a dropdown list. Basically once the customer name value is obtained from the dropdown list, a list of associated 'contact names' at that company will be displayed in the contact name dropdown list. To obtain the values for the dropdown lists, I am thinking that I should:

    • Obtain the values for company name and contact name from 2 separate lists. Thus can you tell me how to 'wire' the 'company name list' and the 'contact name list' to the 'main' list called 'main'? **I am thinking of using an excel import process to load the 'company name list' and the 'contact name list' with data obtained from the sql server database initially just for testing purposes.

    • Once I have completed the prior step, would you show me how to connect a sql server database to the 'main' list? **Note: I am not going to use sql server to start with since this is the first SharePoint project that my company will be using?








Cannot unhide "All Day Event" on Calendar List



At one point I hid the "All Day Event" field on our SP Calendar List since we didn't need it and now we do. Unfortunately, when I went back through the same menu (List Settings -> Content Types -> Event -> Column Name) that I usually use to hide/unhide Columns, but the Column Name was unclickable.


enter image description here


It used to be that "All Day Event" was a link, but now it's not. Any ideas on how I can add this feature back to the forms?






Unable to restart distributed cache service : cacheHostInfo is null



I've tried several steps from other questions. After removing the service instance and running the command Add-SPDistributedCacheServiceInstace I receive the error:



Add-SPDistributedCacheServiceInstance : ErrorCode:SubStatus:No such host is known



The AppFabric Caching Service is running and the service will show up under services after running the command, but cannot be started.


Running the command Get-CacheHost gives:



HostName: ServerName


CachePort: 22233


ServiceName: AppFabricCachingService


Service Status: UNKNOWN


Version Info: 0 [0,0][0,0]



This is a staging environment with one sharepoint server and one sql server






SP Services Published Pages



Does any know how to pull published pages using SP Services ?


I am able pull using Object model, but site seems slower






Microsoft SharePoint 2013 Certification



What is the difference between Microsoft Certification 20331 and 70331 Exam. Please let me also know which is the basic Certification Exam for SharePoint 2013.






Getting duplicate emails from SP2010 Workflow, why?



Folks, I have a workflow that send analysts emails from a SP library with repeating table. I'm only grabbing the Last Analyst in the table to send an email to, but I'm actually getting double the emails from it. My conditions are:


If CurrentItem:Row Number is greater than CurrentItem:Previous Number and CurrentItem:Current Job status = 5. Completed drilling


Then email primary analyst and log history.


I'm not sure where the duplicate would be coming from


Ideas?






What does the site collection feature "Reporting" provision / enable?



The site collection scoped feature "Reporting" has description "Creates reports about information in Microsoft SharePoint Foundation."


What does this feature actually provision and/or enable?


Does it have or create any dependencies when activated?


Given the very generic name and description of this feature all my searches were fruitless, resulting in either dumb lists of all available features with no explanation or tonnes of SSRS results which don't apply.






get items between do two date REST API



can i get the list of items between two date like ?



var startDate.
var EndDate.

var queryGetDiscussion = "?$Date between(startDate, EndDate) ";


Or using LT and GT.






Proper way to customize an InfoPath web-based form with CSS and Javascript



I need to add custom CSS and JavaScript to an InfoPath web-based form.


For which I am planning to export the source files and customize the view1.xsl file.


If I add the customizations in the header, they will be removed by InfoPath Designer next time I edit the form.


If I add the customizations in the body, some other developer may remove them.


My question is - what is the proper way to add customizations? Thank you!






Where are the sample sites to help get me started?



I am in charge of creating the new company intranet sites and need to get up to speed on the best practices and all. Is there a complete start to end solution like the Fabrikam/Contoso type styles that is up to date and relevant for Office 365/SharePoint Online.






Replace NewForm, EditForm with visual web part solutions



I have a visual web part that performs same functions as NewForm.aspx in SharePoint. I can enter data and click save on the visual web part and it saves title field to SharePoint list. Now I would like to replace the NewForm with visual web part. In other words when I click on new item the web part page should open. Thanks in advance






Get all the document libraries where IsContentTypeAllowed is enabled



I am using this PowerShell code to get a list of document libraries where allow content type is enabled. But it does not return anything.



Get-SPWeb http://intranet.site.net |
Select -ExpandProperty Lists |
Where { $_.GetType().Name -eq "SPDocumentLibrary" -and
-not $_.Hidden } |
Select -ExpandProperty Items |
Where { $_["IsContentTypeAllowed"] -eq "True" } |
Select Name, url





Sharepoint change ribbens icons image



In SharePoint 2010 there is an image called formatmap32x32.png which holds all the icon image for the ribbon.


I am building a masterpage and almost done with. The only thing missing is how to change this image programmatically to my own redesigned icons so the user who's going to use my master-page doesn't have to change the image manually by replacing the default picture in the images folder in sharepoint?


the icons should be in one image just like the default one from sharepoint.


the is the default image:


http://s23.postimg.org/j9fqu2iqz/formatmap32x32.png


Any one have any idea on how to?






Can I use a on premise sql database as the back end for a SharePoint 2013 App?



All the information that I can find on accessing SQL from a SP web application involves using Azure - an option my company does not want to use. Thanks in advance.






workflow to send notification email to different group people



I am using SharePoint designer 2010. I have a document library created with content type. when a member is trying to create an item notifications is sent to the members belonging to that item. But my concern is I am having more than 100 groups and needs to check if the person creating the item belongs to any of those groups and send the email to him. How to check is he is any of those 100 groups . what would be the condition or action i can use simply to check if he belongs to any of those 100 groups. And also is there any alternate other than workflow to do this.






Create Approval workflow for Blog in Sharepoint Designer



I am facing problem in creating a simple workflow for "Blogs". If a users writes one blog,then his/her senior would be responsible for "Approving/Rejecting" it.


I am using SharePoint Designer, workflow is created but no edit form is created.






Error while deploying the SharePoint hosted App 2013



I am getting following error while deploying the sharepoint app



"Error 1 CorrelationId: 2f46bcef-ae89-4cde-80ca-273a0c1f8ac9

ErrorDetail: Apps are disabled on this site.

ErrorType: Configuration

ErrorTypeName: Configuration

ExceptionMessage: Microsoft.SharePoint.SPException: Apps cannot be installed. Review the diagnostic logs for more details regarding app deployment failures.

at Microsoft.SharePoint.Utilities.SPUtility.ThrowSPExceptionWithTraceTag(UInt32 tagId,

ULSCat traceCategory, String resourceId, Object[] resourceArgs)

at Microsoft.SharePoint.Packaging.SPUserCodeSolutionDeploymentGroup.Deploy()

at Microsoft.SharePoint.Administration.SPAppTask.DeployOperation()

at Microsoft.SharePoint.Lifecycle.MonitoredTaskExecution.DoTask()


Source: AppWeb


SourceName: App Web Deployment


Error occurred in deployment step 'Install app for SharePoint': Failed to install app for SharePoint. Please see the output window for details.


========== Build: 1 succeeded or up-to-date, 0 failed, 0 skipped ==========


========== Deploy: 0 succeeded, 1 failed, 0 skipped ==========







How to change the site logo of sharepoint online (Office 365) using C#?



I want to change the Site Logo of the Office 365 sandbox solution using C#.


enter image description here


I have tried this code:



site.RootWeb.SiteLogoUrl = imageUrl;


But, Its not working.


I also want to upload the image programmatically & store in sharepoint list (column of 'Hyperlink & Image' type).






Custom form template, issue with field marked as "append changes to existing text"



I've created a custom form template for a content type. The content type is used in a list with versioning enabled and contains a field marked as "append changes to existing text".


In the template I'm using my custom form followed by the default list iterator:



<ProzesseForm:AddForm runat="server" />
<SharePoint:ListFieldIterator ID="ListFieldIterator1" runat="server"/>


As my form control contains all fields of the list definition, the list field iterator normally doesn't display anything. The only issue exists in the display mode of the form. In this mode the iterator displays the versioned fields of my column marked as "append changes to existing text" below my form.


I've tried to add the control SharePoint:AppendOnlyHistory to my form, which will display the same as the list iterator, still the iterator will show the versioned values.



<SharePoint:FormField runat="server" id="FormField18" FieldName="AktuelleBewertung" />
<SharePoint:AppendOnlyHistory runat="server" FieldName="AktuelleBewertung" ControlMode="Display" />


Which control do I have to add in order to skip the rendering of the list field operator?






People Picker Could Not List Founded Users



When I typing username in PEOPLE PICKER it show me not found message but when I hit the Share button SharePoint notification appear and show me the Name of username that I entered and successfully share Team-Site with them


Does somebody knows what's going on with PEOPLE PICKER CONTROL??






Can we Use exchange server with public ip address in one domain for smtp server in other domain in sharepoint Farm ? How?



Can we Use exchange server with public ip address in one domain for smtp server in other domain in sharepoint Farm ? How ?






User Profile Synchronization and server farm account issue



I have SharePoint 2013 farm with 1 Application server and 2 web server on load balance. My user profile is up and running with Server Farm Account. But it always throw below error.


enter image description here So I tried to create another managed account and tried to start UPS service but it never success. I tried lot of goggling on internet but all article tells that UPS will work on only with Server Farm Account.


So now what is wrong Health Error Message or What we are doing that.






Creating Enterprise project type in CSOM



I want to create a new EPT (project server 2013) using C# CSOM library. Here is what i have done so far



List<ProjectDetailPageCreationInformation> pages = new List<ProjectDetailPageCreationInformation>();

projContext.Load(projContext.ProjectDetailPages);
projContext.ExecuteQuery();

projContext.Load(projContext.EnterpriseProjectTypes);
projContext.ExecuteQuery();

pages.Add(new ProjectDetailPageCreationInformation() { Id = projContext.ProjectDetailPages[12].Id, IsCreate = false });


CreateEPT("New EPT ", "test desc", "PROJECTSITE#0", pages);

private static void CreateEPT(string strName, string strDescription, string strTemplateName, List<ProjectDetailPageCreationInformation> pages)
{
EnterpriseProjectTypeCreationInformation newProjType = new EnterpriseProjectTypeCreationInformation();
newProjType.Description = strDescription;
newProjType.Id = Guid.NewGuid();
newProjType.IsDefault = false;

newProjType.Name = strName;
newProjType.ProjectDetailPages = pages;

newProjType.ProjectPlanTemplateId = Guid.Empty;
newProjType.WorkflowAssociationId = Guid.Empty;
newProjType.WorkspaceTemplateName = strTemplateName;
newProjType.Order = 1;

projContext.EnterpriseProjectTypes.Add(newProjType);
projContext.EnterpriseProjectTypes.Update();


}


Getting "EnterpriseProjectTypeCreatePDPIsRequired" error. Any idea how to resolve this? or have you created EPT for office 365 project server using CSOM .






Issue in SharePoint:DateTimeControl



I am putting alert when there is no date selected in SharePoint:DateTimeControl. My code is like



if ($("[id$='DateTimeFrom']").val() == null)
{
alert("Please select From Date.");
return false;
}

else if ($("[id$='DateTimeTo']").val() == null) {
alert("Please select To Date.");
return false;
}
else
{
return true;
}


But though i am entering the date in DateTimeFrom, it gives me the alert.






HTML Editor Webpage diaglog how to hide Save HTML, Edit HTML Source, Styles



I am using Publishing:HtmlEditor control on page and in edit mode I have to hide Save HTML, Edit HTML Source, Styles from popup HTMLEditor windowenter image description here






SharePoint 2010- Send reminders from Task assigned



I am working on a project and its on SharePoint. I have to send reminders to Team Members whom I have assigned a task. But the workflows in SharePoint are restricted. We don't have the designer access?


Can anyone let me know is there any other way to send reminders to Team Members for the task assigned.






How can i create provider hosted app package for SharePoint 2013 App Catalog by using MSBuild



I have created a provider hosted app for my SharePoint 2013 online which created using visual studio 2012. Now I want to create an app package of it using MSBuild or any other way also pass the ClientId and Secret key in it. (like in visual studio by right click on project and Publish it).


Please let me know if you have any solution.


Thanks and Regards, Rushil






Disable WebPart's Title



I created list and new webpart for the list. I don't want to show title of the webpart. I clicked "Edit the webpart" then I clicked Appearance and I selected "None" on the Chrome Type.


First, the method is solved my issue. But when I refreshing page, webpart's title is shown again.


How can I disable the title permanently?






Copy current item Edit Item info path form to create a new item in same list



I have a list whose Edit Item is configured by an Info Path form and customized to receive inputs using text box, drop down etc. After saving/submitting an approval workflow either Approves or Rejects the item. The requirement is to copy the entered details except the ID column to a new form when it is rejected. User would open the Rejected list and from that re-open the form and should give an button option to copy details to new item and create a new item, so that re-entering all the details can be avoided for the new list item.


Please recommend a technique or ways of accomplishing it.






How to Auto-Generating Filenames for InfoPath Forms in SharePoint 2013 Form Library?



I have created a Form Library in SharePoint 2013 When I create new Item in this library it ask me for name.


I need a way to generate that name dynamically


I searched the net found a blog: http://claytoncobb.com/2009/06/20/auto-generating-filenames-for-infopath-forms/


but this blog did it for SharePoint 2007 or 2010 and InfoPath 2007 and InfoPath 2010 not for SharePoint 2013 and InfoPath 2013 How can I generate file name dynamically in the form library in SharePoint 2013






Add FBA Roles to SharePoint 2013 site and assign permissions programatically



I have a problem with adding a FBA role to a sharepoint 2013 site programatically. I tried web.ensureuser method and web.Siteusers.Add() methods and none of them works for me.


SPUser spUser = spWeb.EnsureUser("c:0-.f|ie-fbarolesprovider|groupName");


Thanks


shharepoint developer






Cannot add item to a list



I can create a list and add a custom column to it but there are no items present in the list. Below is the code snippet.



Guid listId = web.Lists.Add("TestList", "TestList", SPListTemplateType.GenericList);
SPList list = web.Lists[listId];
list.OnQuickLaunch = false;
list.Fields.Add("Enabled", SPFieldType.Boolean, true);
list.Update();

SPListItem item = list.AddItem();
item["Title"] = "ABC";
item["Enabled"] = true;
list.Update();

item = list.AddItem();
item["Title"] = "DEF";
item["Enabled"] = true;
list.Update();





SharePoint online - login issue with designer



I am trying to open SharePoint Online site with my designer but I am getting below error:



There is a problem with your account please try again later



Can anyone please let me know the possible cause of this issue.






lundi 29 décembre 2014

performance measurement of "App Web"



In case of provider hosted apps how the performance measurement of "App Web" is different than "Host Web"?






Use a list in two site collection



My solution in : I want have two or more site collection ( for example Human Resource Management and Contract Site) in these site collection I need to have a list ( for example List of Projects). and so use it for lookup or etc! So I want if I update list of Projects in site collection A then I see this update in Site Collection B.






Custom javascript changes are overwritten by default javascript



I tried changing the background color of the left navigation list items when an item is clicked.When its clicked,it shows the effect but when the content in the page layout loads,the color is changed to some other color which I believe is happening because of the default javascript.Following is the code



$( function() {
$('.static a').click(function(){
$(this).css("background","black");
});
});


Note: class name of the left nav list items is 'static' and 'a' has the navigation link of the list item,when an item is clicked its class name changes to 'static selected'. How to make the javascript changes stay still once an item is clicked.






Visio Web Access Webpart - Auto show Shape info menu



I would like to have the Shape info menu open automatically when a visio diagrams show in the web part


See image


enter image description here






FileUpload control's ".HasFile" property returning False even after file is selected?



I am creating a visual web-part for my SharePoint 2013 environment. I am using asp:FileUpload control(fuBrowseXMLFile) in this web-part for uploading files to a document library. I have a button Save to initiate the process of uploading the file.


After deploying the code, i try to run it in Debug mode. I found that after clicking the Save button, when the debugger hits the following line of code,



if (fuBrowseXMLFile.HasFile)


fuBrowseXMLFile.HasFile returns FALSE. Whereas the file is selected in the control.


While searching for a solution, I came across lot of articles. But, unfortunately most of them talk with reference to UpdatePanel. I am not using UpdatePanel here.


I understand that it has to do something with Postback. But, I am not sure what would exactly resolve my problem.






Login dialogs via VPN only for ONE single Web Application, But not any others?



We are using SharePoint 2013 Enterprise with service Pack 1 as our Intranet collaboration platform e.g. (http://Intranet.Domain.com/).


Details: - Our SharePoint Intranet web application uses: Integrated Windows Authentication NTLM.




  • Our end-users come to the company > They login to their computers (Windows 7 or whatever ) using their valid AD accounts e.g. (Domain\UserAccount) or UserAccount@Domain.com > They use only Internet Explorer > When they open our Intranet site: (http://Intranet.Domain.com/) > Everything works OK without any login prompts on pages nor documents at all.




  • All our end-users use Internet Explorer, and our Intranet site is the hom page




  • We have a set of defined GPO rules and settings which includes:




Local Intranet > All the "Automatically Detect Intranet Network" options. Also, On the added Websites, We have: http://*.Domain.com/



  • We do not use https at all.


Issue/Problem: - Many of our end-users are working remotely, and they are using VPN > They use only Internet Explorer > When they open our Intranet site: (http://Intranet.Domain.com/) > A single login prompt will appear and the user must enter his/her account's info again (How to eliminate this?)



  • Once again, If user is connected via VPN and clicks on document file > A single login prompt will appear and the user must enter his/her account's info to be able to access the file. Most importantly, Everytime a user clicks on any document file > A login prompt will always appear (How to eliminate this?)


Attempts: As I stated above that our GPO applies all the necessary settings in IE, and I tried the Windows Credential Manager (From Control Panel) to store credentials, Nevertheless, The login prompt will still appear for te pages only once and for the documents on every single click.


Also (http://www.sharepointdiary.com/2012/04/sharepoint-keeps-asking-for-password.html) did not help obviously.


VERY Strange Surprises:


A) A host-named site collection witin the exact same our Intranet Web Application but obviously has a different URL i.e. (http://Other.Domain.com/) is accessible via our VPN normally without any login prompts on pages nor documents at all !!! How come?


I mean, This is a site collection hosted inside the exact same our Intranet Web Application works perfectly fine via VPN without requiring any logins whatsoever.


B) All the other Web Applications, MySites, Other Site Collections that are running on the exact same server are ALL ACESSIBLE with ALL their documents without any login prompts on pages nor documents at all !!!


C) We have an Intranet test environment that is as far as I know 100% identical to our Intranet production environment, the exact same structure, deployments and settings, yet all the Web Applications, Intranet site, MySites, Other Site Collections are ALL ACESSIBLE with ALL their documents without any login prompts on pages nor documents at all !!!


Questions:


1) Am I missing anything? Have I misconfigured or need to fix something in our production Intranet WebApplication?


I compared the IIS settings/properties, NTLM,...etc and they are the same in test and production.... Why it works ok with the test environment but not with the production?


2) What can be done to completely stop/remove/eliminate these irritating login dialogs for our end-users whom are working remotely via VPN ?


I would really appreciate your inputs and suggestions !


Thank you !






sharepoint 2013 display files by user that they only created



In a new sharepoint 2013 project that I am going to create, I need to allow users to only see the workflows, lists and documents that they create. Each person is not allowed to see each others files. I know that when in the all documents library that is being accessed by sharepoint designer 2013, that I can create a view or fillter that is: a.'modified by' is equal to [me] and/or b. 'created by' is equal to [me].


This way the user can only see their unique files.


Since I am new to working with sharepoint designer 2013, what I am talking about only refers to 'development' and not a production situation as far as I can tell.


Thus would you tell me and/or point me to a link (url) that would show me how to deploy/use unique views so that the user will only see the workflows, lists and documents that they created?






Microsoft SharePoint Foundation Usage service application not found. error



I'm receiving this error on our SharePoint server in event viewer.


When I check the Configure usage and health data collection I see WSS_Logging_fd8d31dd9b964a649407b44127593673 as the database name. When I check the database the DB is listed as WSS_Logging with no GUID attached to it.


If I try to Enable usage data collection, or make any changes at all, I receive the error: A Usage Application already exists in this farm


The service app does exist in the Manage Service Applications page.


I'm thinking this may have become corrupt. Is there any downsides or repercussions to recreating this service?






Features for a Project Management SharePoint site



I'm new to SharePoint and I'm looking for resources to exemplify a good layout for a project management oriented site. I've made a Project site, but that's as far as I've gotten. Has anyone run across any good resources for this?






Change default search box text



How can I change the default text in the site search box? I know how to do this with a search box web part but am having trouble changing the site search box. I tried changing the two control display templates in the search folder but that didn't work. I also looked through the master page and didn't find anything.


I can change the value after the page loads via jQuery, but by doing that I physically change the value and the existing script gets messed up. For example, if I were to use the drop down to search for 'People', when I click it it will run the search because my new value is inserted by the script.


Is there somewhere that I'm missing to go and change the default title and/or value of that search box?






Can I jump to a specific div ID based on the results of a specific variable passed from another page?



Using SharePoint 2010:


I am trying to jump to a specific section on my page, but I need to do it after the document.ready has completed. When I click from page 1, information is added to the end of the URL depending on which button is pushed. When I arrive at page 2, the URL ends in something like this .aspx?Org=Exec.


I have a variable on page 2 that pulls that "Exec" out and now I want to run an if statement that says "If the variable == Exec then jump to the div with the id of "exec" on this page"


I have no idea where to even start with this to get it to work, so I don't have much sample code to provide. I must stress that I need this to occur after the page has finished loading. Normal HTML anchors wouldn't work for this situation.


So, this is what will be clicked from page 1:



<div onclick="location.href='https://websitename/SitePages/ContactUs.aspx?Org=Exec'">Executive Administration</div>


Then when we arrive on page 2, we have this inside document ready:



var anchor = window.location.href.split('?Org=')[1];

if(anchor == 'Exec'){
insert some way to jump to div id="exec"
}


so what the heck do I put in the if statment to make it move straight to the anchor?


Please let me know if I need to provide additional information.






List View Web part not showing all available views for list



We have added a list view web part to a page, and we get the Current View link in the web part. Which is configurable when modifying the actual web part.


What we'd like to see (instead of having to click the ellipses button/context menu to get the other views) is the views displayed horizontally like when you are viewing the list itself.


When viewing the list itself, we see All Items View 1 View 2, etc.


Is this possible in the list view web part to display all available views in a horizontal/breadcrumb layout? Please advise.






add a custom web part programmatically in web part page using Jquery



Hi We have 90 document libraries 90 different districts.


Client wants, each district user should only see their own document library.


I am getting district name from user profile (AD). I am thinking dynamically changing list view web part in one web part page based on District (instead of creating 90 web part pages).


If the coding is necessary only jQuery is allowed. Is it possible? I need help.






Power Pivot 2013 Using SharePoint 2013 List as Source Data



Background:


On a SharePoint 2013 site, there are lists that have the exact same columns but due to their size I had to create a different list for each year. These are essentially my data lists or tables that end users enter data into. These lists have look up columns in them, referencing columns from look up lists or tables located on the same site.


Goals:



  1. Create a Power Pivot Gallery on SharePoint 2013 that is able to leverage the "manage data refresh" feature using the SharePoint 2013 List data that is on the same SharePoint 2013 site.

  2. Combine all the data lists/tables into one table once in Power Pivot 2013. The Look Up lists/tables will remain separate.


Challenge:


Being able to merge or do a union query to the "data lists" and still maintain the ability to leverage the "manage data refresh" feature. This is a tactical, quick fix solution, and I cannot use SQL Server and am operating under the assumption that I do not have Access Services 2013 as an option.


Failed Attempt #1:


What I already tried was linking the lists to an Access 2013 database and did a Union query from Power Pivot which merged the data from the different data tables as I wanted it to.


Then I uploaded that Access Database to a document library on that same site, thinking that I could maintain the ability to leverage the "manage data refresh" feature but I was wrong.


Any thoughts or suggestions?






user control optimze code



I have a sharepoint list with data. A user control is there which fetches data from this list and displays it in the SharePoint page.


Now on every page refresh the list is getting hit which is affecting the performance.


Any ideas how to reduce the hits and increase the performance.






SPO Retrieve HasUniqueRoleAssignements property using Powershell



I am trying to retrieve HasUniqueRoleAssignements property for multiple SharePoint Online lists using Powershell.


I can do it for each one in SharePoint on-premises:



$ctx.Load($list.HasUniqueRoleAssignments)


but the same cmdlet applied for SPO tenant returns an error:



Cannot find an overload for "Load" and the argument count: "1".

At C:\Users\Me\Documents\Customer.ps1:34 char:3

+ $ctx.Load($ll.HasUniqueRoleAssignments) + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

+ CategoryInfo : NotSpecified: (:) [], MethodException

+ FullyQualifiedErrorId : MethodCountCouldNotFindBest



If I don't load the property, it will not be displayed as it needs to be separately requested.

I can access Fields of a list, but fields are columns and not properties.


The property can be loaded and accessed without issue using C#:



ctx.Load(ctx.Web.Lists, wc => wc.Include(w => w.HasUniqueRoleAssignments));


I also tried $list.Retrieve() which should retrieve the properties and IntelliSense but it didn't recognize the HasUniqueRoleAssignments (mind you, it doesn't even suggest .Title)


That begs the questions:

1) Is it possible that using CSOM I would be able to access one property with C# and not with Powershell?? Where can I find a list of PS accessible properties?


2) Can I use Expression like in C# example to load the properties for all the lists or do I need to do that one by one?






How to measure performance of "App web" for provider hosted app?



For a provider hosted app in office 365 created with azure service is running slow. Now, how to measure performance of the App web (no the host web)?


Which tool will be used? Please write steps for this?






Search for employees on a Sharepoint Web Drawing



Background information:


I created a list of employees on SharePoint 2013 and a Visio (2013) diagram of a seating map, 1 tab per building and floor: 6 tabs total of hundreds of employees. I linked the employees on the list to the data graphic and published it on SharePoint. Everything looks good. When I update the list, the change is reflected on the Visio web drawing.


Problem:


Since we have 100s of employees, I need to create a way to perform searches on the web drawing. For instance, if I publish the Visio diagram as a PDF I can perform searches and locate the employee. Is there a way to set this up on a web drawing? Keep in mind I'm a novice SharePoint user but am a quick learner.


Thanks in advance.






People results not returning anything



I've setup UPS and have 7 users from AD. Search has performed a successful crawl and I can search via Everything and find user's my-site pages. When I perform a search by People it returns no results.


I've given permissions in the UPS application to Retrieve People Data for Search Crawlers for the access account used for the search application.


The Managed Metadata Service is running.


My Site Search scope for finding people has been set to People


I'm not sure why people search is not returning any results.






File Drag and Drop Prompt Metadata Properties Dialog



When a user drags and drops a file or files into a SharePoint libary, how can you enforce the metadata properties dialog box to prompt? I found a solution through the Enhance Document Upload by Snapple, but I need something that works with Office 365.


This is what im looking for, but that works with SharePoint Online :) https://www.youtube.com/watch?v=8P2BXSBwP00






SharePoint 2013 LDS Groups permissions not working



I set up LDS Authentication correctly. LDS users can login in without problems. In people picker, I can see lds users and groups, but when I set permissions on groups, they're not effective ... I can't understand why.


The three web.config are configured correctly. I can't find what I miss. I try to craete OU for groups, didn't work (I was still able to select it from people picker), or Container.

Should I use CN=Roles to create groups ?


FYI, I follow those 3 links :

- http://blogs.developpeur.org/anouvel/archive/2010/09/12/sharepoint-2010-configuration-de-l-authentification-par-formulaire-avec-annuaire-ad-lds-partie-3-configuration-de-l-authentification-par-formulaire.aspx

- http://thesharepointfarm.com/2012/01/sharepoint-2010-and-active-directory-lightweight-directory-services-better-together/

- http://sharepointgeorge.com/2009/ad-lds-sharepoint-and-forms-based-authentication/






SharePoint .wsp retraction error



I am deploying a solution by Visual Studio.

I get the error during Retraction:



The solution does not have a WSP file associated with it.



I tried to do IISRESET and also to restart the server.






Sharepoint designer workflow does not automatically start for first list item insert



SharePoint designer workflow does not automatically start for first list item insert.


Second item inserted start workflow automatically. What is the problem?






Load multiple controls to a AdditionalPageHead



I have 2 script files which I want to add to a site. I might add none, either of two or both.


Is there a way to do so by overriding the delegate control AdditionalPageHead?


Currently, I have 2 separate solutions overriding the delegate control. the only difference in the two solutions is



1. the path to the script
2. the sequence number


It works fine for activating one of the delegate control. But as soon as I activate both, the one with lower sequence number starts coming twice.


How can I make the 2 different controls come simultaneously whose order is based on the sequence number?


Any other approach is welcome as long as it doesn't require master page or page layout changes.






FBA with LDAP on SharePoint 2013 Standard not working



I have followed the below article but I am not able to get the FBA working.


http://blogs.msdn.com/b/spblog/archive/2014/09/26/configure-a-sharepoint-2013-web-application-with-forms-based-authentication-with-a-ldap-membership-provider.aspx


I cannot see Forms Auth users when I am adding user policy to my web application, also when I am going to IIS and selecting .Net User or .Net Roles I am seeing the following error



You can use this feature only when the default provider is the trusted provider



I dont know if the above error could be because of the configuration changes that I have made.






Updating List View Web Part property in page



I have a List View web part (In the page > Add web part > App > document library name). I need to update the TitleUrl property of this web part through C# code.


The SaveChanges() method below works for my visual web parts, but not for the List view webpart. I get an error saying: Exception has been thrown by the target of an invocation



webpartManager = myPage.GetLimitedWebPartManager(System.Web.UI.WebControls.WebParts.PersonalizationScope.Shared);
webPart.TitleUrl = titleURL;
webpartManager.SaveChanges(webPart);


I did a casting as below



XsltListViewWebPart listViewWebPart = (XsltListViewWebPart)webPart;
listViewWebPart.TitleUrl = titleURL;
webpartManager.SaveChanges(listViewWebPart);


But I get the error at SaveChanges() method.



An exception of type 'System.Reflection.TargetInvocationException' occurred in Microsoft.SharePoint.dll but was not handled in user code



The error description is as below



> at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[]
> arguments, Signature sig, Boolean constructor) at
> System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj,
> Object[] parameters, Object[] arguments) at
> System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags
> invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
> at System.Reflection.RuntimePropertyInfo.GetValue(Object obj, Object[]
> index) at
> Microsoft.SharePoint.WebPartPages.BinaryWebPartSerializer.DoesPersonalizedPropertValueMatchDefaultValue(SPPersonalizablePropertyEntry
> spPersonalizablePropertyEntry, Object value, Control defaultControl)
> at
> Microsoft.SharePoint.WebPartPages.BinaryWebPartSerializer.Serialize(PersonalizationScope
> scope, BinaryWebPartSerializerFlag binaryWebPartSerializerFlags,
> BinaryWebPartSerializerWriter writer) at
> Microsoft.SharePoint.WebPartPages.BinaryWebPartSerializer.Serialize(SerializationMode
> mode, BinaryWebPartSerializerFlag binaryWebPartSerializerFlags,
> SPSerializationBinderBase serializationBinder,
> BinaryWebPartSerializerWriter writer) at
> Microsoft.SharePoint.WebPartPages.BinaryWebPartSerializer.Serialize(SerializationMode
> mode, BinaryWebPartSerializerFlag binaryWebPartSerializerFlags,
> SPSerializationBinderBase serializationBinder) at
> Microsoft.SharePoint.WebPartPages.SPWebPartManager.SaveChangesCore(SPLayoutProperties
> layoutProperties, Boolean httpGet, Boolean saveCompressed, Boolean
> skipRightsCheck, Boolean skipSafeAgainstScriptCheck, WebPartTypeInfo&
> newTypeId, Byte[]& newAllUsersProperties, Byte[]&
> newPerUserProperties, String[]& newLinks) at
> Microsoft.SharePoint.WebPartPages.SPWebPartManager.SaveChangesInternal(SPLayoutProperties
> layoutProperties, Boolean skipRightsCheck, Boolean
> skipSafeAgainstScriptCheck) at
> Microsoft.SharePoint.WebPartPages.SPWebPartManager.SaveChanges(Guid
> storageKey) at
> Microsoft.SharePoint.WebPartPages.SPLimitedWebPartManager.SaveChanges(WebPart
> webPart) at
> WSP.ABC.ABC.ABCWindow.<>c__DisplayClass5.<ChangeWebPartProperties>b__4()
> at
> Microsoft.SharePoint.SPSecurity.<>c__DisplayClass5.<RunWithElevatedPrivileges>b__3()
> at
> Microsoft.SharePoint.Utilities.SecurityContext.RunAsProcess(CodeToRunElevated
> secureCode)


any reason why ?






Multiple AdditionalPageHead overloads



I have a requirement where I have 6 different jQuery snippets which I have included in 6 different user controls.


And I have 6 different features which override the delegate control with these 6 UserControls. When


I need to activate these 6 scripts with different combinations on different sites.


When I activate a single control, it works fine. But when I activate any 2, the one with higher sequence number starts coming twice.


Is there a way to solve this issue.


My requirement is to activate features in combination which introduces different scripts on page.






Stop Spell check in taxonomy field



I have taxonomy controls on my page-layout which I want to stop spell check at the time of check in page.


The issue I'm facing is that I have 2 taxonomy field on page which behaves differently. In one taxonomy the spell check in not working and in another one spell checking is working.


when I check in the page there is message in pop up that



1 spelling error(s) found



This error is because of one taxonomy only. If I will remove that field than it will not give spell error.






Enable the mobile view in window phone 8.1 sharepoint 2010?



When i'm try to access the sharepoint 2010 in iphone, i getting the mobile version but in windows phone i'm getting desktop version not mobile version. This here ant thing i need to change in compat.browser.






Scope of SharePoint technology in future



Well i have small doubt about SharePoint and that is what scope it has in near future i tried reading and understanding but it couldn't answer my basic question as currently i am working with ASP.NET & MVC i want to get in to specific direction i.e cloud Azure or SharePoint its hard for me to decide which has a better scope. the reason of this doubt is app model in SP2013 or Office356 n MS says to move client side development with JS but then what about C# ASP.NET while Azure still holds good on C# n ASP.NET along with other MS technologies






Getting all the task list records in outlook instead of user specific?



Problem: I am working on SharePoint 2010 Task List after syncing my task list is connected with outlook but in the task list all the data will reflect. i want only user specific data.


Regards Vivek Sheel Gupta vivek.sheel53@gmail.com






Can I add a Quick export to PDF button on my view form?



is there a way to export my view to PDF? so I can paste it into visio?






How to create custom search with sub site1 and its sub sites in SP2013?



we need a create a custom search having the requirement like to create a custom search at subsite1 and its subsites only,i dont want to include sitecollection1 search results in subsite1.


can any one give the query example how to exclude the sitecollection1 results in subsite1 example/Sitecollecion1 example/Sitecollecion1/subsite1 example/Sitecollecion1/subsite1/subsite2 example/Sitecollecion1/subsite1/subsite3/subsite4






Questions based on tenants in SP 2013 Office 365



I have s set of question based on tenants answer of which is not correctly known till now. Please reply inline.



What is the proper meaning of tenant in SP 2013 Office 365?
Do we need a tenant to implement
SharePoint hosted app?
Auto hosted app?
Provider hosted app?
Do we need tenant in development environment?
Does MS create tenant for you in office 365? I guess yes.
At what scope MS create client?


Please explain inline and in details.


Thanking you.






How to implement a blog web part through provider hosted App



Having an Office 365 subscription.


Have a team site where we need to add functionality of a blog web part but not exactly through OOB server side web part. Rather want to create functionality of a Blog web part but with the implementation of Provider hosted apps.


Please write steps how to do this?


Hope I am able to explain my requirement correctly.






SharePoint2010 keywordQuery



I am using the keyworkQuery class to fetch some items from a Sharepoint2010 list.

I need to fetch also the Attachments for each item how can I do?.


I tried:



KeywordQuery kw = new KeywordQuery(proxy);
kw.SelectProperties.Add("Attachments");


But I get this error:



Property doesnt exist or is used in a manner inconsistent with schema settings







trial of this product expired error



Hi for sharepoint foundation team site today I am getting error as trial of this product expired error.I am able to open only settings page in team site and can view site collection in central admin.I did solutions like 1 checking application pool account as part of local administrator group and all started in iis management 2 run the products configuration command for registry errors 3 unchecked the rule definition of trial expired in central admin health analyzer issues


still no luck


Please help me






People Picker Could Not List Founded Users



When I typing username in PEOPLE PICKER it show me not found message but when I hit the Share button SharePoint notification appear and show me the Name of username that I entered and successfully share Team-Site with them


Does somebody knows what's going on with PEOPLE PICKER CONTROL??






SharePoint 2013 plan for external users



I have a SharePoint server, that required to be accessed from outside. SQL Users are not good to manage, and a new AD with unilateral approbation is not permitted.


So I wonder if I can use AD LDS, as I'm new for it, do you have any thoughts, or good links to understand what should I do with LDS if I need to enable external user to login into SP 2013 and enable internal user to login in too.


I have questions like :

- Do I need to install LDS on a new server ? LDS Server needs to be domain-joined ?

- Does my SP Server need to be domain joined ?

- Now, I have a server farm with 1 SQL, 1 SP Server with internal site and CA and 1 SP Server with external site. Should I delete the 2nd server from the farm and install a fresh new standalone SP server for external purpose ?


TIA






dimanche 28 décembre 2014

Sharepoint 2007 -Named Pipes Provider, error: 40 - Could not open a connection to sql



We took the standalone sharepoint server (SP_sql in same machine)as Virtual machine.In virtual machine there is change in the IP address and coumpter name.


After that i have run the sharepoint configuration wizard. i got error like below.


An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)


I tried below links recommended solutions but still the same error encountered.


http://www.mssqltips.com/sqlservertip/2340/resolving-could-not-open-a-connection-to-sql-server-errors/


http://www.mssqltips.com/sqlservertip/2320/understanding-sql-server-net-libraries/


Kindly help me to resolve this issue.






how to create custom search in SharePoint 2013 with OOTB features?



can any one please tell me the steps to create a custom search in sharepoint 2013 using OOTB features and i want to know few more things. How to search only documents? How to search only lists? How to filter author and date?


Regards, phani






User Profile Synchronization and server farm account issue



I have SharePoint 2013 farm with 1 Application server and 2 web server on load balance. My user profile is up and running with Server Farm Account. But it always throw below error.


enter image description here So I tried to create another managed account and tried to start UPS service but it never success. I tried lot of goggling on internet but all article tells that UPS will work on only with Server Farm Account.


So now what is wrong Health Error Message or What we are doing that.






SharePoint 2013 wiki page link pop up ( [[ ) only work for site administrator



I am trying to build a Enterprise wiki site on our SharePoint 2013 on-premise farm. When I login with site admin, by type in "[[" in edit mode, it automatically jump up the other wiki pages I built. (e.g. [[Animals/Dog )


However, when I am editing the same page with another user who have "edit" right, the automatically link fill up function no longer work. The user can still build wiki links if he know the path. He have access to all pages under /Pages library.


Why is that and how can I work around it?






How to download backup of contoso SharePoint 2013 site?



Microsoft has provided a SharePoint web application of a fictitious company named Contoso.


Can any one provide link from where we can download backup of that site? We need just for our training purpose.






How to implement a blog web part through provider hosted App?



Having a office 365 subscription, how can we implement a blog web part through provider hosted App in a SharePoint online site?


In this case implementation will be through Provider hosted App, but functionality of Blog web part is required. J


Please write steps how to do this?






Azure AD:: Error getting access token



I've been getting the following error while getting the code, which would then be sent to get the Access Token.



{u'error_description': [u'AADSTS90090: A transient error has occurred. Please try again.\r\nTrace ID: 59018278-3d04-4114-9602-750c12af57be\r\nCorrelation ID: 366dd9d6-1cb0-4729-bdca-87d57ded50d6\r\nTimestamp: 2014-12-28 17:12:28Z'], u'error': [u'temporarily_unavailable']}


This was working fine earlier yesterday and since then I've been getting this error every time I try to complete the Oauth process. Any explanation for it?






is there a way to remove all permissions from a folder using remote event receiver?



is there a way to "ask" programmatically through a "remote event receiver", if an item that has been added to a document library is a folder? i want to remove all permissions when folder is been added to the document library






Accessing SharePoint Online Library from a Cloud IDE? Claims based and Web DAV questions



We have some jQuery development on a SharePoint Online 2013 site Assets library.


Basically a SharePoint Page, with content editor webpart pointing to an html page in Site assets that in turn references javascript and jquery libraries.


On my windows desktop, apparently if my o365 credentials are stored, i can navigate to site assets library and edit the html and js files with no problem.


I'm trying to do the same from a Chromebook where browser explorer view (webdav) is not available. I've tried with a number of popular Cloud IDEs like Koding, Cloud9 and Chrome app Codeanywhere with no luck ..






Preview my site as guest user



I'm completely new to SP , and i don't understand whether how can i preview my website as external user? how can i see what users that aren't admins/got any permissions see? Couldn't find a clear answer on google.


Thanks,






samedi 27 décembre 2014

Custom CSS not applied after changes



I have made changes to my custom CSS on the sharepoint portal using sharepoint designer. then I saved it. I went to check on the protal, however The changes I made were not applied. I check the CSS using chrome's developer tools and I was modifying the correct sheet but the changes I made were not included there. why sharepoint is not applying the changes I made to css? I checked in the css then checked it out but nothing seems to work. It is already published. I researched and found that I should clear BLOB cache? How do I do this exactly? but I'm afraid this may affect the server so I rather not do it since I'm new to sharepoint development. Why the changes are not applied? Is there any other way to fix it without clearing BLOB cache?






Exclude users who's names contain



Trying to automate my O365 licensing and have had some sucess but am not sure how i can accomplish the following...


I have users who i do not wish to license and they all share the value "svc" in their DisplayName.


In trying to test how this would work i'm dumping the values returned out to a CSV file but no matter what i do i cannot exclude users with those values in their names. I can do a "contains" and it finds just them...but when i try a "notcontains" i just get all of the users including those with SVC in their name.


Does anyone know how i can exclude users that have svc in their names? Here is my code....



$SyncUser = get-msoluser -all | Where-Object { $_.isLicensed -ne "TRUE" }

Foreach ($a in $SyncUser){

if ($a.DisplayName.NotContains("svc")) {

add-content -value ($a.Userprincipalname) -path $Logfile
}
}





Get the filename of the first attachment in a list item



I have a custom view form for my list. The form needs to display the contents of the list item as well as the photo that is attached to the list item. Currently I am having the end user copy and paste the filename into a separate column and using that to complete the src for the <img> tag.


I have used the following code to display the image on the .aspx form:


<img border="0" src="/Lists/Barring Records/Attachments/{@ID}/{@photo}" style="max-width: 1000px; max-height: 600px;"/>


where @ID is the list item ID and @photo is the copy-and-paste filename. This works but is awful for the end user.


Is there a way to find and reference the first attachment for the list item and insert it where the {@photo} goes? I do not care about any other attachments but the first. I would prefer to do this on the form page, but can put the code elsewhere if instructed.


I have SharePoint Foundations 2010






jQuery Code Only Works When Alerts are Active



I posted this to Stack Exchange as well, and I was wondering if some of my fellow SharePoint developers could help me out. This is not a SharePoint direct question, but I am building a site collection feature with a ribbon button. Here is my x-post:


I have created a feature on SharePoint to export selected items from a view to Excel. The code I have works when the alerts are present. I know I have an asynchronous problem within my function and I need some help figuring it out. I do not quite understand how to use the $.Deferred() methods, and when I try, I get errors. Most likely because I am doing it wrong. Here is my code, all works and populates fine when I activate my alerts:



function get_Data() {

var ctx = SP.ClientContext.get_current();
var items = SP.ListOperation.Selection.getSelectedItems(ctx);
var i;



context = GetCurrentCtx();
list = context.ListTitle;
view = context.view;

viewFields(list, view);

//for (i in items){

for (i=0; i<items.length; i++){
myItems = items[i].id;
//alert(myItems);

$().SPServices({
operation: "GetListItems",
async: false,
listName: list,
viewName: view,
CAMLQuery: "<Query><Where><Eq><FieldRef Name='ID' /><Value Type='Counter'>" + myItems + "</Value></Eq></Where></Query>",


completefunc: function(xdata, status){

//alert(xdata.responseXML.xml);
$(xdata.responseXML).SPFilterNode("z:row").each(function() {

var xitem = $(this);

for (var z = 0; z < values.length; z++){
var variables = xitem.attr(""+ values[z] +"");
//alert(variables);
dataItems.push("<td>" + variables + "</td>");
}
tableRows.push("<tr>" + dataItems + "</tr>");
dataItems.length = 0;
//alert(tableRows);

});
}
});


td = tableRows.toString();
td = td.replace(/,/g, "");

//alert(td);
}


var th = headers.toString();
th = th.replace(/,/g, "");


//alert(th);


hidden = "<div class='my_hidden'><table class='hiddenTable' id='hiddenTable'><tbody><tr>" + th + "</tr>" + td + "</tbody></table></div>"
$("#aspnetForm").append(hidden);

success();

}


I need the success(); function to run after all to the nested loops have completed. It is firing before anything gets started it seems. The alerts keep it form skipping over the loops and .each functions. How do I get the loops to finish before I run the success(); function? This is my last piece and I am done with this code. Any help would be greatly appreciated. Thanks!






Sharepoint app REST Authorization Header



I have developed a Sharepoint app that I installed on my sharepoint site for testing. I filled it with data and now I want to run REST queries on my app with Postman in Chrome.


Once I am logged in to my site in Chrome it works, but when I am not logged in I get Access Denied.


How do I fix this? Do I have to use the OAuth 1.0 for this? What should I put in the fields (Consumer Key, Consumer Secret, Token Key, Token Secret etc)?


Thanks for your help!






Get documents and folders in SharePoint 2010 list's folder with REST



There is a question about getting files/folders in some SharePoint folder. There is advice to filter list items by parent folder path. But how can I list files/folders in the List itself?

With REST I can only get list short name (e.g. 'AppPackages'). It allows me getting list content with REST service '_vti_bin/http://ListData.svc/AppPackages', but I cannot get neither readable name/title (e.g. 'App Packages') for showing it nor root folder path (e.g. '/Lists/AppPackages') for further filtering immediate files/folders.

I tried SOAP and I could get both title and root folder for list but cannot get short list name to use it further in REST calls. There is also no stable way to find correspondence between SOAP-obtained (title, root folder) pair and REST-obtained short name



Ideas and comments are very appreciated!






vendredi 26 décembre 2014

People Picker Port Tester Failed to DNS Test



I have a Problem with People Picker in Sharepoint 2013,


I have One Domain Server with windows server 2008 and one Server for MSSQL 2012 and Sharepoint 2013. "we have a small network with 14 users at max". Also we Have Kerio in network for Control internet sharing.


My Problem is i can't find any user with People Picker but i can select "Everyone" | "Domain Admin" and etc.


I test my Ports and DNS With People Picker Port Tester: https://peoplepicker.codeplex.com/


And unfortunately the DNS Test section returns "no dns found" but all my ports can get connected. "I Allowed Ports in Firewall in both Servers"


I also find this error log when i trying to find users in AD with PP:



12/17/2014 00:37:20.23 w3wp.exe (0x1728) 0x1A88 SharePoint Foundation General 72e7 Medium Error in searching user 'Some-User' : System.DirectoryServices.DirectoryServicesCOMException (0x80072020): An operations error occurred. at System.DirectoryServices.SearchResultCollection.ResultsEnumerator.MoveNext() at Microsoft.SharePoint.WebControls.PeopleEditor.SearchFromGC(SPActiveDirectoryDomain domain, String strFilter, String[] rgstrProp, Int32 nTimeout, Int32 nSizeLimit, SPUserCollection spUsers, ArrayList& rgResults) at Microsoft.SharePoint.Utilities.SPUserUtility.SearchAgainstAD(String input, Boolean useUpnInResolve, SPActiveDirectoryDomain domainController, SPPrincipalType scopes, SPUserCollection usersContainer, Int32 maxCount, String customQuery, String customFilter, TimeSpan searchTimeout, Boolean& reachMaxCount) at Microsoft.SharePoint.Utilities.SPActiveDirectoryPrincipalResolver.SearchPrincipals(String input, SPPrincipalType scopes, SPPrincipalSource sources, SPUserCollection usersContainer, Int32 maxCount, Boolean& reachMaxCount) at Microsoft.SharePoint.Utilities.SPUtility.SearchPrincipalFromResolvers(List`1 resolvers, String input, SPPrincipalType scopes, SPPrincipalSource sources, SPUserCollection usersContainer, Int32 maxCount, Boolean& reachMaxCount, Dictionary`2 usersDict). 1c99d69c-fd6c-d086-2e71-662fc7a6ad20


Thanks for Help.






sharepoint 2013 storing data



In my company, we are just starting to use sharepoint 2013. I have been assigned a 'protype' project that will be used by other workflow projects that will be setup in the future.


My question is about how the data is stored accessed and updated. I know that you can store the data in a sql server database and there is a service that can be setup for security purposes in Sharepoint 2013. My problem is the database and security have not been setup right now. I need to have this prototype setup before the DBA and sharepoint admin can setup the configurations for me.


Thus can you tell me and/or point me to a url that will tell me how to setup the storage for the lists I want to setup in sharepoint designer 2013?






Wrokflow not behaving correctly



I have a work flow that fires off email notifications at specific dates, based on the number of days between the Expiration date and Today. It works up until a user goes to change the date of the list item, and then nothing happens. Here's what I have so far. Any help is appreciated.


enter image description here


Thanks






clear sharepoint property bag cache without apppool cycle



I've inherited code that uses the P&P code for accessing a farm-level property bag property on SharePoint 2013 SP1. The code has an application page to manipulate the property bag, and another application page that uses the values in the property bag.


It appears that SharePoint caches the property bag values - when I change the values in the maintenance page, they are not reflected in the consumer page, until I recycle the application pool.


I've looked a lot and I see people talking about how those values are cached, and some people e.g. Caching mechanism for parameters stored in a web application's property bag talking about doing their own caching, but I don't see any way exposed to flush the cache or the like. The values are changed infrequently enough that a cache flush isn't a problem - but any time we can avoid cycling a SharePoint app pool is a good thing, so we'd like to just force the cache to invalidate.


How do I do that?






Creating a lookup field that contains calculation?



![So I created a lookup table, how would go about truncating via a lookup?


For example,


Choices 56, 56SW, 56FR are using the same calculation


Choices DDS IDSL, ISDN TR, ISDN are using the same calculation


choices HDSL, HDSL2, HDSL4 are using the same calculation


What would be the best way to go about that....


Is there a way to have the user choose a one of those and then perform the calculation?


So if user chooses HDSL2 it will do the HDSL calculation, same thing if user chooses HDSL4 instead it will do the HDSL calculation since HDSL, HDSL2, AND HDSL4 are the same calculations...


Choices DDS IDSL, ISDN TR, ISDN are using the same calculation


choices HDSL, HDSL2, HDSL4 are using the same calculation So if user chooses HDSL2 it will do the HDSL calculation, same thing if user chooses HDSL4 instead it will do the HDSL calculation since HDSL, HDSL2, AND HDSL4 are the same calculations...


Any help would be appreciated ]1






How can I add a workflow 2010 to an app project in Visual Studio 2013?



I have to develop an app to a Sharepoint 2013 Foundation site. Sharepoint Foundation only accepts workflow that uses the engine 3.5.


How can I add this kind of workflow in an app project?






After changing AAM SharePoint 2013 Prompting for Credentials



I have SharePoint 2013 foundation. Till now I am connecting with sharepoint website with server name. Now I added new AAM url to connect different url. But when I am trying to access with new AAM url. it keep asking me credentials


enter image description here


What I did from my side





  1. Added site bindinging in IIS for new url.

  2. Also changed DisableLoopbackCheck link

  3. Updated host file also


Still it is asking for credentials. What next to change?






How To Get All User Profile Properties And Get Difference between User Hire Date And Current Date?



i have class UserProperties.cs in that i write some code=> public UserProperties(SPUser currentUser) { using (var site = new SPSite(SPContext.Current.Web.Url)) { try { LoadUserProperties(site, currentUser); } catch (Exception exp) { LoggingService.LogError("Failed to get " + currentUser.Name + "'s information", exp); } } }


private void LoadUserProperties(SPSite site, SPUser user) { CurrentUser = user; var userLoginName = CurrentUser.LoginName;



SPServiceContext serviceContext = SPServiceContext.GetContext(site);
var profileManager = new UserProfileManager(serviceContext);

var userProfile = profileManager.GetUserProfile(userLoginName);

Profile = userProfile;
//object value
var currentuserHireDate = userProfile[PropertyConstants.HireDate].Value != null
? userProfile[PropertyConstants.HireDate].Value.ToString()
: "";

CurrentJobFunction = userProfile[PropertyConstants.Department].Value != null
? userProfile[PropertyConstants.Department].Value.ToString()
: "";

CurrentJobFunctionUrl = GetJobFunctionUrl(CurrentJobFunction);

CurrentLocation = userProfile[PropertyConstants.Office].Value != null
? userProfile[PropertyConstants.Office].Value.ToString()
: "";

CurrentLocationUrl = GetLocationUrl(CurrentLocation);

PrefferedName = userProfile[PropertyConstants.PreferredName].Value != null
? userProfile[PropertyConstants.PreferredName].Value.ToString()
: "";

ProfilePicture = userProfile[PropertyConstants.PictureUrl].Value != null &&
!userProfile[PropertyConstants.PictureUrl].Value.ToString().Equals(string.Empty)
? userProfile[PropertyConstants.PictureUrl].Value.ToString()
: "/_layouts/15/images/PersonPlaceholder.200x150x32.png";

MyProfileUrl = userProfile.PersonalSite != null ? userProfile.PersonalSite.Url : "#";

if (userProfile[PropertyConstants.PreferredName].Value != null)
{
FirstName = userProfile[PropertyConstants.FirstName].Value != null &&
!userProfile[PropertyConstants.FirstName].Value.ToString().Equals(string.Empty)
? userProfile[PropertyConstants.FirstName].Value.ToString()
: userProfile[PropertyConstants.PreferredName].Value.ToString();

LastName = userProfile[PropertyConstants.LastName].Value != null &&
!userProfile[PropertyConstants.LastName].Value.ToString().Equals(string.Empty)
? userProfile[PropertyConstants.LastName].Value.ToString()
: string.Empty;
}
}


//I have NewHire webparts in NewHire.cs i write some code to test can i access all user properties ->


private HtmlGenericControl GetHtmlForNewHires() { var userproperties = new UserProperties();



var url = userproperties.MyProfileUrl;
if (string.IsNullOrEmpty(url))
url = "#";
var s = userproperties.FirstName;
var article = new HtmlGenericControl("article");

article.InnerHtml = s;


}


//But i am not getting user properties i have 5 user profiles. and also also i want to get user having hire date is within last 30 days






SPServices.SPCascadeDropdowns not working



Who knows as to connect it to the HTML form??? not to NewForm.aspx and to HTML form?



type="text/javascript">
$(document).ready(function() {
$("#State").SPServices.SPCascadeDropdowns({
relationshipList: "SOGP",
relationshipListParentColumn: "Title",
relationshipListChildColumn: "LC",
parentColumn: "Title",
childColumn: "LC"
});
});





The length of the URL for this request exceeds the configured maxUrlLength value. REST API



I was wondering if someone could help, or am I missing something. In the articles found here http://ift.tt/13IyE86


They refer to using the /getfilebyserverrelativeurl. When I build my request and try and make a HttpWebRequest I get



The length of the URL for this request exceeds the configured maxUrlLength value



in the webresponse.


I'm making these requests from a console application against Office 365/SharePoint Online.


The url length is is 305 in this test case.


This is the code I am using



HttpWebRequest request = HttpWebRequest.Create(resourceUrl) as HttpWebRequest;
request.Credentials = _credentials;
request.CookieContainer = _cookieContainter;
request.Headers.Add("X-RequestDigest", _formDigest);
request.Method = "POST";
request.Timeout = 3600000;
request.Accept = "application/json; odata=verbose";
request.ContentLength = incomingStream.Length;
request.AllowWriteStreamBuffering = false;
request.KeepAlive = false;

using (var reqStream = request.GetRequestStream()) {
incomingStream.CopyTo(reqStream);
}

WebResponse response = request.GetResponse();
using (System.IO.StreamReader sr = new System.IO.StreamReader(response.GetResponseStream())) {
result = sr.ReadToEnd();
}


When its caught by the WebException and I read the exception response all I get is this "The length of the URL for this request exceeds the configured maxUrlLength value."


This is the resourceUrl:



http://ift.tt/13J0vVa('/personal/user_account_tenant_onmicrosoft_com/Documents/Test/7601.17514.101119-1850_x64fre_server_eval_en-us-GRMSXEVAL_EN_DVD.iso.001')/startupload(uploadId=guid'38acfb37-ccd5-4ac1-961d-090ce1ed9d6f')







User Profile Server Issue on Restore Process



I got backup my SharePoint site then I restored the back-up another server.


But i got error as follow :



User Profile Service Error 12/26/2014 9:59 AM Object User Profile Service failed in event OnRestore. For more information, see the spbackup.log or sprestore.log file located in the backup directory.
SPException: The specified component exists. You must specify a name that does not exist.


I got same error for Excel Service Application. I deleted Excel Service Application and I didn't get the error. I want to delete the User Profile Service Application, but I got error as follow:


enter image description here


How can I solve this issue? I'm not deleting User Profile Service. I'm changing service name but I got same error.