Hot answers tagged

5

Do you know how to build a basic web part? If not I suggest you learn this first. Here's a sample tutorial: http://msdn.microsoft.com/en-GB/library/ms415817(v=office.14).aspx Next you want to learn how to develop against web services. Helpfully, Yahoo have a tutorial on how to deal with responses to web services as XML within C# applications: http://...


5

Ok, after lots of trial and error i got it. Turns out that A, no matter the locale of the site collection, the Client object model must enter in the english syntax. B, " and & throw syntax errors unless written as & quot; and & amp; so the correct code is: <Field Type='Calculated' DisplayName='Periode' LCID='1043' ResultType='Text'><...


4

This is afaik the only way to do it SECURELY the ajax answer on that page is a bad example however of how to acheive this, the accepted answer is the correct way: Hiding buttons of the Ribbon Bar


4

CSOM and the REST API include the WebProxy for these operations. Query a remote service using the web proxy in SharePoint 2013 Code sample: $.ajax({ url: "../_api/SP.WebProxy.invoke", type: "POST", data: JSON.stringify( { "requestInfo": { "__metadata": { "type": "SP.WebRequestInfo" }, "Url": ...


4

I'll assume what you are trying to do is change a Choice field's type using PowerShell. In that case you can do something like this: $web = Get-SPWeb -Identity http://your.site.url.here $list = $web.Lists["YourList"] $field = $list.Fields["YourField"] $field.Type = [Microsoft.SharePoint.SPFieldType]::MultiChoice $field.Update() The SharePoint SPFieldType ...


4

It's actually very simple! :) You only have to duplicate the <Button tag and the <CommandUIHandler tag. Also be sure to duplicate the <ControlRef in the <Layout, or else the new button will not show. Something like: <?xml version="1.0" encoding="utf-8"?> <Elements xmlns="http://schemas.microsoft.com/sharepoint/"> <...


4

Use the /_api/site/id REST Endpoint to locate the desired ID. Edit: /_api/site/id


3

This article describes how to do it. I had a need to view the raw XML being generated from a Content Query Web Part today, so I could see exactly what data was being returned in each column. This is how to do it. The PublishingResources feature of MOSS2007 contains a file entitled ContentQueryMain.xsl, which is the primary stylesheet for the ...


3

Your question implies that you already know the specific item. That makes it easier to isolate the data you want. Each of the lines shown will return a text response as shown below assuming that these are not "special" fields like choice, lookup, etc. This URL will return christophe http:/.../_vti_bin/listdata.svc/Contacts(2988)/Contact/$value This URL ...


3

Have a look at http://blog.jsonpify.com/ or, as suggested on the blog above, have a look at http://developer.yahoo.com/yql/ YQL can be called from client script using JSONP, allowing you to pass a SQL-ish query against an "Open Data Table". An Open Data Table is an abstraction layer similar to a BCS model in SharePoint. An Open Data Table abstracts web ...


3

If you are only using id's, it worked for me only with: 1;#;#2;#;#3


3

<asp:Content ContentPlaceHolderId="PlaceHolderPageTitleInTitleArea" runat="server"> <label class="ms-hidden"><SharePoint:ProjectProperty Property="Title" runat="server"/></label> </asp:Content> This is a snippet from default.aspx in C:\Program Files\Common Files\microsoft shared\Web Server Extensions\15\TEMPLATE\...


3

Try adding Both Delegate controls and it should resolve your problem.


3

The error: The remote server returned an error: (403) Forbidden. occurs since authentication is required for this operation in SharePoint Online. You could utilize SharePointOnlineCredentials class from CSOM API for that purpose. The following example demonstrates how to download RSS feed from SharePoint Online and save it into file. Complete example ...


3

Isbah you can use any website which offer feeds or service to give prayer times. See islamicfinder.org/prayer_search.php for example. Also github.com/meltuhamy/masjid-times/wiki/Prayer-Times-Web-Service


3

If you need to update via direct xml then use SetViewXml method of view. So your code would like this SPList list = web.Lists["Test"]; SPViewCollection collViews = list.Views; string strViewName = "NewVIEW"; System.Collections.Specialized.StringCollection collViewFields = new System.Collections.Specialized.StringCollection(); string strQuery = ""; ...


2

Ok, I found the solution. In the URL parameter of the JavaScript function, instead of ~site, I should have used {SiteUrl}. So the UrlAction node should be: <UrlAction Url="javascript:OpenPopUpPageWithTitle( '{SiteUrl}/_layouts/SP/MyAppPage.aspx?ListId={ListId}&ItemId={ItemId}', RefreshOnDialogClose, ...


2

I think to save the file you would need something like Downloadify Getting the XML depends if you want it custom formatted etc. You could just use Javascript to call the lists.asmx yourself or Do it as office does it and go FrontPage RPC If you want custom, then you could build it in the DOM for ease and then export to a string variable, then ...


2

I am basically having a similar issue. When I programmatically add the file, the workflow starts on create. It will then fail. Sometimes, it appears to not start at all. What I have gathered from the log files is that the workflow is being started before the add operation is complete. SharePoint throws an error in the workflow because listitem has ...


2

Create a reference to the Workflow Association and start it yourself. void startWorkflow(SPListItem item, string workflowName) { SPWorkflowAssociation wfA = item.ParentList.WorkflowAssociations.GetAssociationByName(workflowName, System.Globalization.CultureInfo.CurrentCulture); item.Web.Site.WorkflowManager.StartWorkflow(listItem, wfA, wfA....


2

You will probably find that changing web.config files to store application settings for SharePoint Features is not your best solution. For an alternate solution that may work better for you, please refer to the Applications Setting Manager of the Microsoft Patterns and Practice SharePoint Guidance. SharePoint 2007 guidance includes a section on Managing ...


2

The path to the icon is inserted at the time you created the post and unfortunately it is not dynamic. You have to edit the posts prior to adding the PDF icon and update the path to the proper icon image file. All new post after the PDF icon was added will show correctly.


2

Are you doing this in C# server-side code? If so, this is really easy as the WebPart object itself exposes the XMLLink property. Client side? No-go. The control renders in the server.


2

I guess the implementation of XDocument.Load(string) doesn't support an authenticated request to retrieve the XML file. However, there is another way because the approach that you are taking will mean that each time a document is opened two web requests are being made. One to build the Url using the SPFile object To access the SPFile object using the Url ...


2

EnableContentTypes="TRUE" instead of EnableContentType="TRUE" (note the s)


2

You can reach the text inside dataBlobXml using the following template: <xsl:template match="field[@name='dataBlobXml']"> <xsl:value-of select="." /> </xsl:template> But this will come as text node into the template. So if you want to parse it further, you will have to either use string functions (like substring-before and substring-...


2

An ampersand in XML must be escaped as &amp;, so your software is behaving quite correctly. When the XML is parsed by the recipient, assuming a correct XML parser, it will translate the escaped &amp; back to &.


2

This is an architectural change in 2013. See: http://joelblogs.co.uk/2013/02/15/sharepoint-2013-content-databases-and-the-alluserdata-table/ EDIT: The article above has been updated/corrected. Thanks Mike D.!


2

Use %26 instead of &. It helped me. Like here: <Edit>_Layouts/project/custom Form.aspx?PageMode=Edit%26WFTask=1</Edit>


2

You can achive it by using business data list connector for sharepoint 2010, after downloading and installing it, try with the following steps, 1.Create your list in SharePoint, e.g. a custom list named XML. Tipp: Use an appropiate list type, e.g. contacts for address-based information etc. 2.Goto List Settings > General Settings > Connect to external data ...


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