Tag Info

New answers tagged

0

If you have Inherits='TRUE' then you may be getting the expected behavior. In this case changes to any of the properties of fields inherited from the base type will be ignored. Also, any attempts to remove fields inherited from the base type will be ignored. As far as I can tell, the only thing you can do when Inherits is true is add additional fields to the ...


0

If I understood it correctly, you just want to pass the dialog result back to your application page. First, you should write a function to which the result will be passed. You can do it like this: function myCallbackFunction(result, returnedValue) { if(result == SP.UI.DialogResult.OK) { alert("Id: "+returnedValue.Id+", Name:"+returnedValue.Name); ...


0

You can use the current SharePointContext instance instead of redirecting back to the SharePoint host and then being redirected once again to the app to get a new context (as suggested by Rahul). Add these utility methods to the auto-generated SharePointContext.cs file (at around line 277 which is where the SharePointContext class definition ends. Don't ...


1

The problem was related to a automated Visual studio function when adding the Content Type to the List Definition using Visual Studios Interface. Somehow a missmatch was created. Although recreating the list definition solved my issue it dosnt explain why there was a problem when I add the Content Type to Manually created Custom lists.


0

The property site.AllWebs returns an object of SPWebCollection which inherits from IEnumerable<T> interface. This interface has a function called OrderBy using which you can order the SPWeb based on their Title property. SPWebCollection webColl = site.AllWebs; IEnumerable<SPWeb> sortWebColl = webColl.OrderBy(w => w.Title); foreach (SPWeb web ...


0

The following approach works for me. Instead of casting, I use the Properties collection. You would of course have to change the creation of the context / authentication and the way you look for the specific WebPart which in this case is done by title. using System; using System.Linq; using Microsoft.SharePoint.Client; using ...


0

Best practice? Don't do this in SharePoint. It's NOT a relational database system and you will be fighting it every step of the way. Every form, every workflow, every interaction will require code in some form, nothing will work out of the box.


1

Audience is not equal to Security! Audience on pages is mainly for showing / hiding the page from for example the current navigation, users will still be able to find and edit the page through links and site content for example


1

Considering you are not interested in the whole document library VS mapped folder discussion, I believe that the main reason for placing branding elements (aka CSS) in the "Styles" mapped folder, instead of the parent, "Layouts" is mainly when you want to use the Themable engine. Whether you want to host your resources in a site or directly reference them ...


0

The answer, as always, is it depends. The first thing to consider is scope. Where are these files going to be used? If they are going to be used farm-wide then it makes most sense to deploy them to the _layouts folder. If they need to be visible at the site collection level then style library or site assets makes sense. You also need to consider whether ...


0

To me, it depends on what you are doing. If you are deploying a branding feature, then I would deploy it to the file system. This way you don't have hundreds of copies of your CSS and JS files lingering around. One place, easier to update should changes be necessary. If the feature is site or site collection scoped, than I tend to do the style library or an ...


2

If you use file system then during system backup those files will not get backed up. This is the same case with system migration. All files in file system needs to be moved separately. On the other hand if you use libraries then those files will be placed in the content database and will be included in backup as well as system upgrade etc. If you place ...


1

John, if you are creating the site columns from the visual studio use the DisplayName property of the field for your case <Field ID="{2690E8BF-0801-408A-8445-93D816DF5D29}" Name="LastName" DisplayName="Last Name" Type="Text" Required="FALSE" Group="Custom Site Columns"> </Field> <Field ...


2

You can't delete the copy because it is associated to the Seattle.html file. What you have to do is create a copy of the Seattle.html file to. This will create a copy of the html file (Seattle_copy(1).html) that you need to rename to anything you want, maybe "delete" as an example. Doing this will give you a dialog that asks if you would like to update the ...


1

I think we can use Closure to fix the problem. javascript:function sendingURL() { var ctx = SP.ClientContext.get_current(); var items= SP.ListOperation.Selection.getSelectedItems(ctx); var url = ''; var wnd; for (var i in items) { url += document.getElementById(items[i].id).getElementsByTagName('a')[0].href + '\n'; wnd = ...


1

Because you do it for each item. For each item you assing the created window to the variable wnd. So at the end, wnd is the last opened window. However, for each item you want to close wnd after 3 seconds. that works for the first time, but then wnd is already closed. You would have to assign a unique variable for each item (or do it in the item´s scope)


3

If you want to change file name of an already uploaded document try below code: Get the uploaded file object using ID/ URL or which ever way suits you, then try this: ListItem item = uploadedFile.ListItemAllFields; item["Name"] = "NewName"; item.Update(); // use OverwriteCheckIn type to make sure not to create multiple versions ...


1

The problem lies as you are updating Title with Name, the .aspx extension is also getting appended. Try updating the page name to something else and if it works then do a string manipulation in the workflow so that .aspx doesn't get included when you are copying the Name to Title. Please share your results for the solution, maybe I can help you better if it ...


5

If you can whip up a console app and schedule it and it does the job - then great. I probably would rely on PowerShell. I prefer being able to monitor and alter scripts if needed without having to recompile or open up VS to make the edit. When working with data I've also used SSIS packages on SQL server. If you are running SharePoint locally you have an ...


1

You have two options: Create a timer job. Is is similar to console application, that is run on periodic basis and is managed by SharePoint. Here is a tutorial how to create one. Cons: you will have to implement custom logging if you need one; it is not friendly to start it manually, etc. From architecture perspective: timer jobs are global artifact on ...


1

You can use the AddFieldAsXml method (see the MSDN): ClientContext clientContext = new ClientContext(siteUrl); Web site = clientContext.Web; var targetList = site.Lists.GetByTitle("YourTargetList"); var relatedList = site.Lists.GetByTitle("FaseList"); var fields = targetList.Fields; clientContext.Load(relatedList); clientContext.ExecuteQuery(); var fields ...


0

I'm not 100% percent sure, but it seems that you need to update the list item and not the file. From the pictures above, it looks like you need to use this post url: $ajax({ url: https://examplecustomer.sharepoint.com/sites/examplesite/_api/web/lists/getByTitle('Dokumenter')/items(19)", type: "POST", data: "{ '__metadata': { 'type': ...


0

You can develop Event Receivers, Timer Jobs and WebParts for SharePoint 2013 Foundation - as sandbox or farm solutions. However, you can't use "Business Data" and "OOTB Recommendations" Webparts as these are not available in SharePoint 2013 Foundation. I find this resource helpful when comparing SharePoint 2013 versions: ...


0

SP2013 is a x64 only application, therefore also their dlls work only in applications built for x64. Verify in you Project properties that it ist built for platform target x64 (not "any cpu") and try again


0

The below snippet can be helpful which is referred from How to Check if SharePoint Site Collection or Sub Site Exists //To Check if site collection - "Sales" exists at the Web Application's Explicit inclusion Managed Path - "Sales" - <a href="http://somesite.sharepoint.local/Sales">http://somesite.sharepoint.local/Sales</a> using (SPSite ...


4

John Q: First you need to dig deeper into the field definition using SharePoint Manager 2013, and observe if property 'AllowGridEditing' exists? A: The property doesn't exist so give PowerShell a break ;) Why: In SharePoint 2013, client-side rendering (CSR) provides a way to control the output/design of your fields and set of controls by leveraging HTML ...


0

As noted by @Hristo Yankov you shouldn't set the string value directly as it may break the search index. Use the appropriate public APIs instead. myTaxonomyField.SetFieldValue(myListItem, myTerm);


0

You can install the Sharepoint on windows 7, This is not supported but developer usually use for their own testing and learning. check this Install SharePoint 2013 on Windows 7/8/8.1 I would highly recommend to install the VM on your windows 7 and install the SharePoint on it. You need the SQL server, Windows Server for the SharePoint, check the complete ...


1

I would suggest you to install Virtual Machine like VMWare WorkStation and then you have to install Microsoft windows server and Microsoft SQL after that SharePoint 2013. Personally I referred this blog when I was installing my SharePoint. You can do the same and make sure you are meeting the system requirements for SP2013. How to install it, please this ...


1

first , you need to decide on which version that you would like to have and then follow the msdn articles for latest 2013 version for hardware and software requirements. Reference msdn link you can also choose the version in the same article to get the understanding on pre-requisites.


2

please look at this link, it shows how to achieve what you're trying to do. using System; using Microsoft.SharePoint.Administration; namespace Test { class Program { static void Main(string[] args) { SPDiagnosticsService diagSvc = SPDiagnosticsService.Local; string ulsLogLocation = diagSvc.LogLocation; ...


3

@john You can try setting ReadOnlyField property of the field to True $field.ReadOnlyField = $True


2

You'd SystemUpdate like this: var spFile = web.GetListItem(_listUrl + item.Name); spFile["Website Link"] = hyperlink; spFile.SystemUpdate(); https://msdn.microsoft.com/en-us/library/office/microsoft.sharepoint.splistitem.systemupdate.aspx Updates the database with changes that are made to the list item without changing the Modified or Modified By ...


0

i know it is a bit late but i was just involved in a similar Scenario: I used the MembersWebPart in SharePoint 2013 and this is a working example: <WebPart xmlns="http://schemas.microsoft.com/WebPart/v2"> <Assembly>Microsoft.SharePoint, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c</Assembly> ...


1

Try going to default.aspx. If it shows up, you can then set it as the default home page. Edit: Since that doesn't work, since that doesn't work. Go to Site Settings and go to the Page Layouts and Site Templates Settings link. In the Page layouts section, add (Welcome Page) Blank Web Part Page and any other page layouts you may want. Go to your Pages ...


1

I assume you have a GridView with at least single column Rank as shown below <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" HeaderStyle-BackColor="CornflowerBlue" HeaderStyle-Font-Bold="true" HeaderStyle-ForeColor="White" CellPadding="5"> <Columns> <asp:BoundField DataField="Rank" ...


1

Create web service using PHP, then call the web service from custom Approval workflow. It means you will need to create copy of the existing Approval workflow so that you can modify it and add step that uses the "Call HTTP Web Service" action. Instructions on using the action can be found here. On SP2010, you can use this CodePlex project to include Web ...


0

In the Article the Author is using the column's internal name: f.Name === 'Request_x0020_Status'; I think if you use the internal name of the column f.Name === 'Formate Number' which would be I am assuming 'Formate_x0020_Number' might solve the issue. You can get the internal name for a column by browsing to the List Settings > Edit Column and look ...


0

This is not exactly what you asked but it's the thing i usually do when faced with this kind of task: basically shove the items in a more dev friendly type to work with since the SPListItemCollection methods are rather scarce ... var coll1 = SPList1.Items.Cast<SPListItem>(); var coll2 = SPList2.Items.Case<SPListItem>(); coll1.Concat(coll2); ...


0

Here is a working example. Code looks mostly the same as yours except for the use of the Content property. var web = context.Web; var list = web.Lists.GetByTitle("Project Documents"); var filePath = Environment.GetFolderPath(Environment.SpecialFolder.DesktopDirectory) + @"\Samples\Sample01.docx"; var fci = new FileCreationInformation(); fci.Content = ...


0

There is a alternative, you can take datatable of each listitem collection using list1.getDataTable() and you can merge those data table and iterate it in a single for loop. SPListItemCollection list1Coll = list1.Items; SPListItemCollection list2Coll = list2.Items; DataTable dTable1 = ...


0

I found the answer. The data in the php file was not processed as jsonp because I'm using php 5.1 which doesn't have json_encode function implemented. So I used jsonwrapper: http://www.boutell.com/scripts/jsonwrapper.html Full php example code: require 'jsonwrapper/jsonwrapper.php'; $array = array( '0' => array('fullName' => 'Meni Samet', ...


-1

Have you tried this: list1.AddRange(list2); This would combine two lists but does not remove any duplicates.


0

Fortunately, SharePoint gives us lot of out-of-box functionalities. You may use it in a better way to develop the applications. Like Views, Content editor,media library views etc...


0

You can set a page as home page through sharepoint designer but if you need to check it is home page or not check this link: https://msdn.microsoft.com/en-us/library/microsoft.sharepoint.spcontextpageinfo.iswebwelcomepage.aspx


1

You should do it like this: http://myserver.mydomain.com/sites/MyCompany/_api/web/GetFileByServerRelativeUrl('/sites/MyCompany/012_MyDepartment/Shared%20Documents/rm/MyToolConfig/config.xml')/CheckOut() And Request should be POST. Hopefully this helps.


0

I found out that i simply have to call base.EnsureWebpartReady(); After this call the SharedQueryManager is correctly initialized. Thanks for your help!


0

Remember to copy the xslt from the original web part as the default xslt coming with a new CoreResultWebPart is for internal SharePoint search, and will not render anything.


1

I've found the solution, so I'm posting it in case someone else has the same problem. It turns out I wasn't getting all the job-definitions in the system after all - I still had to check the job definitions for available web sites. Here's the code: jobs.AddRange(SPWebService.ContentService.WebApplications.SelectMany(wa => wa.JobDefinitions)); ...



Top 50 recent answers are included