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

SharePoint 2013 - Applying a spcolor file on MySite with Feature Stapling?

$
0
0
Hi all!

Have read that the only good way to apply some branding on MySite Creation is to do this by feature stapling.
Thus I don't want to get my hands to dirty,  I just want to customize the colors and perhaps change the default font on MySite.

So my question is, is it possible to apply only a spcolor file as well as a font file to the feature to be activated on the users MySites?

Or must I copy and make a custom "core15.css" file to achieve this...?

It's hard to understand why MS haven't added a simpler way to change the default looks for the MySite site-Collections =/

Best Regards.
Philip 

SPListItemCollection.GetDataTable() delivers wrong Double Values

$
0
0

Hi there,

i have a Problem with the .getDataTable() Method of a SPListItemCollection Object. Within the SPListItemCollection all Double Values are displayed correct. But the DataTable Edition puts the decimal point to the End of the number. And i have no idea why, and how to get rid of this. Any hints?

DataTable dt = new DataTable("ChargeData");

listItems[0]["PRICE"] -> 107.10 | object {double}

dt = listItems.GetDataTable();

dt[0]["PRICE"] -> 10071.0 | object {double}

P.s.: If this is realted in some way, the initial List for the SPListItemCollection is a External List with a MSSQL Connection. The 'Price' Column within the SQL Server is a "float".

My Best Regards

THO

EDIT #1

I've try to figure out when this problem appears. Always or only on BCS lists, so i tried (with Powershell), and found out, this seems to be a Problem with the Autogenerated BCS List.

$nonbcslist.Items[0]["PRICE"] -> 107,10 | double

$dt = $nonbcslist.Items.GetDataTable()

$dt.Rows[0]["PRICE"] -> 107,10 | double

$bcslist.Items[0]["PRICE"] -> 107,10 | double

$bcsdt = $bcslist.Items.GetDataTable()

$bcsdt.Rows[0]["PRICE"] -> 10710 | double


Detect what the default edit form is for a document library and list using jquery

$
0
0

Hi,

So what I have done is with some jquery made it that when a files are dragged and dropped into a document library and there is a required field such as "Metadata" the EditForm.aspx opens up for the user to fill in the required column. I am building the url up from what I have found in SharePoints DragDrop.js file. This is all working perfectly I just need to find a way to dynamically find what the default edit form is for that document library as I have just hardcoded like this...

g_currentControl.strSiteUrl + "/" + this.ListName + "/Forms/EditForm.aspx?ID=" + id

So I need a way to figure out what the default edit form is instead of hard coding like this in case someone creates a custom_editform.aspx or something for one of the lists.

Thanks

App for SharePoint online : Resource files can not with the app install package deployment

$
0
0

I come from China, my English is not very good, bring you the confusion, I apologize;In the development of the APP to the store, I met a problem, hope someone can help me to solve, thank you very much, specific as follows:

The development tools: vs2012

Platform: office 365 development version

Host:Auto

Problem presentation:

Press "F5" debugging running normally,Generate app install package, deploy to test environment, the app page error, tip can't find the resource file"

error:

Server Error in '/' Application.

Object reference not set to an instance of an object.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 

Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.

Source Error: 
Line 107:    <div id="FoundareADUserIndex_PageHead">
Line 108:    <span><img alt="" src="../images/head.png" height= "45px" width="45px" /> </span>Line 109:    <span style="color: #000000; font-size: 28px; font-weight: bold"><%=HttpContext.GetGlobalResourceObject("FoundareADUserResource", "foundare_index_head").ToString()%></span>&nbsp;Line 110:        
Line 111:

Source File: c:\DWASFiles\sites\fzym9dfaguchcdqnvjrwcr2pqasevj5hpvhmcaydkdg1.0.0.0\VirtualDirectory0\site\wwwroot\Pages\Default.aspx    Line: 109 

Stack Trace: 

how to track any change at sharepoint site level

$
0
0

Hi,

I want to achieve is,

create an event receiver or workflow for a SharePoint Site so that any change made @ site level or site collection level which in turn may include any change at any list,library, everything @ site/site collection level----a mail should get fired to a certain sharepoint group(Administrative).

I found that  we can do this with "Change Log" but how?

Is it a list or library or what else?

How could i fire a mail when a new item gets added to it?

sharepoint 2013 workflow templates for visual studio 2012

$
0
0

i need to create a workflow for SP2013 using visual studio but unfortunately sharepoint workflow templates are not there in VS2012,

even i installed "windows platform installer 4.6" and installed workflow from templates but no use.

SharePoint Workflow Doesn't Kick Off When ListItem is Updated by Script

$
0
0

I use a PowerShell script which is kicked off on a schedule from the Windows task scheduler. The scheduled task runs under the farm service account credentials. This script queries a SharePoint list and does some processing. Once the script has finished processing, it sets the status on the SharePoint list item to indicate that it has completed successfully. There is a SharePoint workflow on the list that should kick off once the list item has been updated by the script. This workflow should send an email out to people who need to know that the process has completed and make a log entry so that there is history in the list item stating that the email went out. When I check the data in the list item, I can see that the script did in fact update the data, but unfortunately, the workflow never kicks off upon the status update by the PowerShell script. When I manually launch the workflow, the emails go out and the log entry is made (as expected).

I find an article on a technet blog that I understand to be saying that a system account should not be used to update a list item if the update should be expected to trigger a workflow.

When I found this article I went back and changed the credentials in the scheduled task to use a different domain account. I ensured that the new account had full control on the list.  The script kicked off, but didn’t successfully query the list, so I made the new account a site collection administrator, but this didn’t help. I’m still getting the following error:

“The local farm is not accessible. Cmdlets with FeatureDependencyID are not registered.”

I need to be able to query a list (and update it) using a PowerShell script. I need the SharePoint workflow to kick off when the list item is updated by the script. How can I successfully accomplish this?


Freddy Thomas

MS SharePoint 2010 Designer Workflow Email - Enhanced Rich Text Field look-up values on HTML email have large spaces

$
0
0

MS InfoPath 2010 form with RTF (Rich Text Fields)

MS SharePoint 2010 Custom Library

MS SharePoint 2010 Designer Workflow Send Email

http://office.microsoft.com/en-us/sharepoint-designer-help/send-e-mail-in-a-workflow-HA010239042.aspx

https://www.nothingbutsharepoint.com/sites/eusp/pages/creating-html-emails-with-spd-workflows.aspx

Hi all of the above work, our question is how to control the RTF (Rich Text Field) look up values to the InfoPath 2010 form in the HTML email?

How to FORMAT the RTF look up value? in the HTML email

EXAMPLE

we have a InfoPath 2010 form published in the SharePoint 2010 custom list library there are 5 RTF fields (Notes1, Notes2, Notes3, Notes4, Notes5) there are other plain text fields, date fields, and other field types in the form

We use a HTML table to make the email look like the InfoPath form, so when the users fill out the form and they get the email notification everything looks the same.

Our problem is the EXTRA LINE SPACE in the RTF look up values

We want to remove any leading spaces, and line spaces between HTML table cells

Our Workflow has the HTML in a Workflow variable, as you know it does not support remote CSS it has to be in-line style for any formatting we want all cells to havevalign="top" the email should align at the top of the cell, all field types do except the RTF look up values they make the email look bad and they contain a lot of white space.

Please test this in your enviroment 

<table>

<tr><td>Title:</td><td>[%Current Item:Title%]</td><td>[%Current Item:Notes1%]</td></tr>

<tr><td>Created by:</td><td>[%Current Item:CreatedBy%]</td><td>[%Current Item:Notes2%]</td></tr>

<tr><td>Date Created:</td><td>[%Current Item:Created%]</td><td>[%Current Item:Notes3%]</td></tr>

<tr><td>Modified by:</td><td>[%Current Item:ModifiedBy%]</td><td>[%Current Item:Notes4%]</td></tr>

<tr><td>Date Modified:</td><td>[%Current Item:Modified%]</td><td>[%Current Item:Notes5%]</td></tr>

</table>

I could not update the question below to the proper forum section. that is why i am asking again.

http://social.technet.microsoft.com/Forums/en-US/a7918bfb-9166-4bdb-828c-132a0c7611e3/ms-sharepoint-2010-designer-workflow-emails-huge-lines-paces-in-rich-text-fields-values-from-ms?forum=sharepointcustomization


-Isaack


Emailing external user using a workflow in Sharepoint 2013

$
0
0

I am currently trying to create a list where the user can upload a document, input an email address (external) and an expiration date. I then have a workflow that will send an email on the expiration date. The problem I am getting is that Sharepoint 2013 doesn't like emailling externally.

Please help.


Evil Genius at Work. DO NOT DISTURB!!!

JSLink does not work on column in a calendar list

$
0
0

Can someone confirm the following:

I created a calendar list, added a lookup column to it and added a JSLink with custom script to that column.

I then go to a new / edit item form:

In any other list, the lookup + JSLink work perfectly.

In calendar list, the page does not even register my JSLink script file. There is no reference to it anywhere on the page, and it is not being loaded.

I suspect, calendar list forms do not support JSLink property on a column?


Regards, Shai Petel.

Restricting Modified Date value with System Account

$
0
0

Hi,

We have a document library called testdoc.

Now requirement is not to update 'Modified Date' whenever System Account updates the column.

Basically Modified Date is default sharepoint column where it is updated if document is modified by any user?

Now please let me know how to restrict the same if System Account modied any file in the document library?

Regards,

Sudheer


Thanks & Regards, Sudheer

The property or field 'ListItemCollectionPosition' has not been initialized exception when using Linq statement

$
0
0

Hi there,

I try to get all item ids from a list with CSOM.

I use a paging to get 5000 in one loop.

The problem is I always get the following exception when I try to get the ListItemCollectionPosition:

"The property or field 'ListItemCollectionPosition' has not been initialized. It has not been requested or the request has not been executed. It may need to be explicitly requested."

If I use the Load() Method without Linq it works. But for performance reasons I just want to get the id and the positon.

Thank
Stephan

Code:

listItems = documentsList.GetItems(camlQuery);

clientContext.Load(listItems,items => items.Include(item => item.Id));

clientContext.ExecuteQuery();

ListItemCollectionPosition itemPosition = listItems.ListItemCollectionPosition;

Set group owner using REST API

$
0
0

I'm trying to use the REST API to set the owner of a SharePoint group. I can successfully create the group using REST, but I can't change the owner. I've tried the following.

1 - Specifying a group owner while creating the group

Endpoint: .../_api/web/sitegroups
Method: POST
Headers:
Content-Type: application/json; odata=verbose
Body:
{ '__metadata': { 'type': 'SP.Group' }, 'Title': '<title>', 'Description': '<description>', 'Owner': { '__metadata': { 'type': 'SP.Principal' }, 'Title': '<owner_title>'}}

This returns a 500 error: "The specified name is already in use. Please try again with a new name". In other words, the owner title I specified already exists, which is correct - I'm trying to make an existing principal the owner of the new group.

2 - Merging a new group owner into an existing group

Endpoint: .../_api/web/sitegroups(<group_id>)
Method: POST
Headers:
Content-Type: application/json; odata=verbose
X-HTTP-Method: MERGE
Body:
{ '__metadata': { 'type': 'SP.Group' }, 'Owner': { '__metadata': { 'type': 'SP.Principal' }, 'Title': '<owner_title>'}}

This returns a 500 error with a Microsoft.SharePoint.SPException: "Exception from HRESULT: 0x80131904". The trace logs don't shed any light on it.

3 - Using the owner endpoint directly

Endpoint: .../_api/web/sitegroups(<group_id>)/owner
Method: POST
Headers:
Content-Type: application/json; odata=verbose
X-HTTP-Method: PUT
Body:
{ '__metadata': { 'type': 'SP.Principal' }, 'Title': '<owner_title>'}
This throws various 400 errors. If the current owner of the group is a user, I get the error "The required property 'Email' does not exist in the message" - i.e. it wants SP.User properties. If the current owner of the group is another group, I get the error "The required property 'AllowMembersEditMembership' does not exist in the message." - i.e. it wants SP.Group properties.

I've tried various adaptations of the three approaches above, such as specifying additional SP.Principal properties or passing SP.User or SP.Group objects instead, but with no success. Any ideas?

2007 -> 2013 Upgrade .webpart and .dwp's

$
0
0

I recently did an upgrade from 2007 to 2013.  The content database is in 2013 version and the site collection has been upgraded to 2013.

But what we are noticing is that even after I reactive 2013 Publishing on every site/web the webparts in the webpart gallery are still referrencing version 12 of the sharepoint dll's.

E.g. The content query webpart did not show up in content rollup.  It's in the Default group and it's type is referencing version 12.  So I deleted the .webpart for it and reactivated publishing and poof the COntent Query Webpart showed up where it's suppose to and it works now.

Then on a whim I made a tool download all of the .dwp and .webpart files from the webpart gallery and used a search tool to scan them for version 12 references.  I found this list:

AuthoredListFilter.webpart

BusinessDataActionsWebPart.dwp

BusinessDataAssociationWebPart.webpart

BusinessDataDetailsWebPart.webpart

BusinessDataFilter.dwp

BusinessDataItemBuilder.dwp

BusinessDataListWebPart.webpart

CategoryResultsWebPart.webpart

CategoryWebPart.webpart

contactwp.dwp

ContentQuery.webpart

DateFilter.dwp

FilterActions.dwp

IViewWebPart.dwp

Microsoft.Office.Excel.WebUI.dwp

OlapFilter.dwp

owa.dwp

owacalendar.dwp

owacontacts.dwp

owainbox.dwp

owatasks.dwp

PageContextFilter.webpart

QueryStringFilter.webpart

RssViewer.webpart

SearchHighConfidence.webpart

siteFramer.dwp

SpListFilter.dwp

SummaryLink.webpart

TableOfContents.webpart

TasksAndTools.webpart

TextFilter.dwp

ThisWeekInPictures.DWP

TopSitesWebPart.webpart

UserContextFilter.webpart

WSRPConsumerWebPart.dwp

My question is.... Is there a way I can upgrade these to 2013.  I know that some of these won't have 2013 versions, but I can see 3 right of the bat that do.  Is there a way to get the publishing feature to overwrite them?  Or someone bench these to a sub folder or something?

I'm looking for the right way to do this, I could just delete them all and reactivate everything and see what shows up, but then I might me missing .webpart/.dwp's that are still needed.


My Blog: http://www.thesug.org/Blogs/ryan_mann1/default.aspx Website: Under Construction

Inserting a 'Related List' on a Display Form when child list is 'Tasks' list -- does not filter child items when the 'View Style' is 'Default'...

$
0
0

This is fairly specific... but here is my situation

I have a parent list with an InfoPath Display Form, and I have 3 lists with related items.

The first two related lists are based on the 'Custom List' template and work fine when adding related items (and with passing filter values from the InfoPath form part manually)

The third related list is based on the 'Tasks' list template and does not filter task items related to the parent unless you use a list view style other than 'Default.' Using the related list button from the ribbon, and setting up the connections manually does not work unless the view is changed as mentioned previously.

I would like to use the default view for the Task list since it provides a check to complete functionality from the list view.

I believe I've tested this thoroughly, and can't seem to find any straightforward way of using the default view. I realize there are a couple workarounds (such as creating custom xsl for the list view, or just using a different view style - as I'm doing now) but seems like everything else about this works fine.. might be an easy fix as long as someone knows about it....

SPGridview refresh behaviour

$
0
0

In SharePoint Page , 2 webparts are added

First one is custom webpart  - SPGriView  added to updatepanel

Second one custom webpart with button which refresh  SPGridview in first webpart

This button  also changes the values of one of the column in SPgridview

for the first time  when button is clicked it shows  that SPgridview will not be changed but for second time  will show the changed value which supposed to be visible on first click and so on

any ideas , why SPgridview doesnt show updated value for first click and for further clicks it shows the  older values?


SP Page: http://www.facebook.com/SharePointQ SP Blog: http://swatipoint.blogspot.com

Question about cross domain requests

$
0
0

I am just starting trying to create some simple sharepoint-hosted apps using the REST service and jQuery. I've found several samples online, but have run into what I'm sure is a very simple problem when I try to recreate/debug them. Basically, they will set the url to the service to something like

var searchRestSource = spPageContextInfo.webAbsoluteUrl + "/_api/search/";

However, when I try to debug, the app is hosted in its own domain, so this does not point to my sharepoint site's search api, rather it points to the app domain's search api, and that is causing me problems.  So what I am looking for is any advice on what steps I may be missing to be able to debug code like this. 

Getting Access denied exception while updating listitem using Rest API

$
0
0

Hi,

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

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


Thanks in advance

Mani

Unable to associate declarative workflow with list

$
0
0

Hi,

I have a simple workflow with no arguments and no list association. After successful deployment when I openAdd new workflow window I can see my workflow under available workflow definitions. Here is where the fun part begins. When I fill up the form and hit OK I'm redirected to the same form that now list declarative workflows only and couple of settings missing. And there is no way to continue since the only available actions are Back/Previous and Cancel. After checking the ULS logs I found this entry:

System.ArgumentNullException: Value cannot be null.  Parameter name: definitionId    
 at Microsoft.SharePoint.WorkflowServices.StoreWorkflowDeploymentProvider.GetDefinition(Guid workflowDefinitionId)    
 at Microsoft.SharePoint.WorkflowServices.WorkflowDeploymentServiceServerStub.GetDefinition_MethodProxy(WorkflowDeploymentService target, XmlNodeList xmlargs, ProxyContext proxyContext)    
 at Microsoft.SharePoint.WorkflowServices.WorkflowDeploymentServiceServerStub.InvokeMethod(Object target, String methodName, XmlNodeList xmlargs, ProxyContext proxyContext, Boolean& isVoid)    
 at Microsoft.SharePoint.Client.ServerStub.InvokeMethodWithMonitoredScope(Object target, String methodName, XmlNodeList args, ProxyContext proxyContext, Boolean& isVoid)    
 at Microsoft.SharePoint.Client.ClientMethodsProcessor.InvokeMethod(Object obj, String methodName, XmlNodeList xmlargs, Boolean& isVoid)    
 at Microsoft.SharePoint.Client.ClientMethodsProcessor.GetObjectFromObjectPath(XmlElement xe)    
 at Microsoft.SharePoint.Client.ClientMethodsProcessor.GetObjectFromObjectPathId(String objectPathId)    
 at Microsoft.SharePoint.Client.ClientMethodsProcessor.ProcessInstantiateObjectPath(XmlElement xe)    
 at Microsoft.SharePoint.Client.ClientMethodsProcessor.ProcessOne(XmlElement xe)    
 at Microsoft.SharePoint.Client.ClientMethodsProcessor.ProcessStatements(XmlNode xe)    
 at Microsoft.SharePoint.Client.ClientMethodsProcessor.Process()
However the workflow instance is created if I specify the association in Visual Studio. My guess is that there is something messed up with Workflow Manager but I can't figure it out. Any help would be appreciated.

find hidden column value in a dynamacally bind html table with Sharepoint list - Javascript

$
0
0

I have following code. Now I want to get the hidden column value based on user selected row. I also want to highlight the entire row, not only the e.target.
Can someone please help me.

function getTermdetailsQuerySuccsess(sender, args){var listEnumerator =Termsitems.getEnumerator();var datatable = document.getElementById("TermList");while(listEnumerator.moveNext()){var oListItem = listEnumerator.get_current();//var firstName = listEnumerator.get_current().get_item('Title');//var secondName = listEnumerator.get_current().get_item('LastName');var termID = listEnumerator.get_current().get_item('ID');var startdate = listEnumerator.get_current().get_item('startdate');var enddate = listEnumerator.get_current().get_item('Enddate');var termtype = listEnumerator.get_current().get_item('TermType');varHours= listEnumerator.get_current().get_item('Hours');varEdNone= listEnumerator.get_current().get_item('EdNoned');varSpecialty= listEnumerator.get_current().get_item('Specialty');varSubspecialty= listEnumerator.get_current().get_item('Subspecialty');varHospital= listEnumerator.get_current().get_item('Hospital');var DEMT = listEnumerator.get_current().get_item('DEMT');varSupervisor= listEnumerator.get_current().get_item('Supervisor');

        rowcount = rowcount +1;
        $("#TermList").append("<tr style='border-bottom:1px silver solid' align='middle'  class='gradeA'>"+"<td align='left' style='display:none'>"+ termID +"</td>"+"<td align='left'>"+ startdate +"</td>"+"<td align='left'>"+ enddate +"</td>"+"<td align='left'>"+ termtype +"</td>"+"<td align='left'>"+Hours+"</td>"+"<td align='left'>"+EdNone+"</td>"+"<td align='left'>"+Specialty+"</td>"+"<td align='left'>"+Subspecialty+"</td>"+"<td align='left'>"+Hospital+"</td>"+"<td align='left'>"+ DEMT +"</td>"+"<td align='left'>"+Supervisor+"</td>"+"</tr>");}}

 $('#TermList').click(function(e){var tr = $(e.target).parent().index();
        alert(tr);
        alert($(e.target).text());// using jQuery//  var Cells = tr.e.getElementsByTagName("td");

        $(e.target).addClass('row-highlight');var confirmationM = confirm("Do you want to edit this term deatils ?");if(confirmationM ==true){
            confirmation ="You pressed OK!";}else{
            confirmation ="You pressed Cancel!";
            $(e.target).removeClass('row-highlight');}});


 $('#TermList').click(function(e){var tr = $(e.target).parent().index();
        alert(tr);
        alert($(e.target).text());// using jQuery//  var Cells = tr.e.getElementsByTagName("td");

        $(e.target).addClass('row-highlight');var table = $("#TermList")[0];var cell = table.rows[tr].cells[1];
        alert(cell);var confirmationM = confirm("Do you want to edit this term deatils ?");if(confirmationM ==true){
            confirmation ="You pressed OK!";}else{
            confirmation ="You pressed Cancel!";
            $(e.target).removeClass('row-highlight');}});


d.n weerasinghe

Viewing all 25064 articles
Browse latest View live