Tag Info

New answers tagged

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

I found the source of the problem. The context address used did not exactly match the url containing the WebPart so this combination throws the exception string contextAddress = "http://spserver.company.com/" string url = "http://spserver.company.com/SomeWeb/SitePages/Homepage.aspx" while this combination works fine string contextAddress = ...


0

You may want to re-think your data architecture. A document library can contain custom columns for metadata, but if you have half a novel in a multi-line text field, that does not seem like a good approach. Excel can easily store more than 800 characters in a cell, but it throws errors depending on the delivery method (formula vs. manual entry, one string ...


0

While you do not know how high the content will be after setting the width you will need two calls. By the way: the CSS you provided where do you put it in? the AppWeb oder the host Web? it should go to the host web because there the styling takes place. another waay is to use a greater default width value. instead of 300 so that the margin will not be to ...


1

I do not understand your question ~remoteAppUrl is the Token you insert for and the matching will be done in SharePoint with the information you provide on /_layouts/15/appregnew.aspx


0

I tried MigrateUsersToClaims() method but was not successful. Users still cannot login. Then I tried this command and was successful! (as stated by Microsoft official) Convert-SPWebApplication -Identity "your-web-application-url" -To Claims -RetainPermissions WARNING: The conversion of web application and most of the users to Claims mode is completed. ...


0

Ok, so i think i stumbled upon a method which might solve the issue: The postMessages API. This is nothing SharePoint related but can be used with SharePoint though it features communication between host and iFrame sites. So the way to go should be: postMessage the host site return something unique for the page like the __REQUESTDIGEST or something self ...


0

You need to Download SharePoint Online Management Shell and SharePoint Online Client Components SDK in order to work with SharePoint Online using PowerShell. Then you can write PowerShell code and execute it in SharePoint Online Management Shell. Following sample code creates a list (Document Library) in SharePoint online. #Import the required DLL ...


0

You can use the SharePoint Online Management Shell to efficiently manage users, sites, and organization. To run the SharePoint Online Management Shell cmdlets, you have to be a SharePoint Online global administrator. First you need to connect to SharePoint online using Connect-SPOService -Url https://contoso-admin.sharepoint.com -credential ...


0

You can refer the below articles which covers end to end for configuring and managing SharePoint farms on Azure VM's. Reference-1 Reference-2


0

Here is a client side solution. First, get all table data and put them into an array, let's call it dataCollection. Each element in dataCollection is an object that represents a list item in the target list. The object might be like: { "field1": "field1 value", "field2": "field2 value" } Second, loop through dataCollection, in the loop, create a ...


0

To crawl external htlm site, you dont need to upload it. You need to create a new content source and crawl the site. On Search admin page, click on Manage Content Source. On this Page click on New Content Source. Complete the farm click ok. Run the full crawl. Make sure you Search Content Account has Permission on external html site. Read more over here: ...


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


0

Take a look to this method: SyncList(). We implemented this behavior using reflection (SPWebs follow the same pattern with SyncWeb() method)


1

Audiences have to be built and compiled before they can be used. Audiences are built in the User Profile Service area of Central Administration and are based on user profile properties. For example, you could create a Marketing audience where the membership includes everyone with the Department of Marketing. Once defined and compiled, it is available in ...


1

It heavily depends on the URLs which are configured to access your SharePoint sites. I would guess that you access your Intranet-SharePoint via a non-FQDN URL (e.g. http://intranet) and your Extranet-Site via FQDN (http://extranet.company.com). Internet Explorer does an automatic zone detection. If my assumptions match your environment, IE will assign your ...


1

my issue got resolved with help of below link https://dotnetadil.wordpress.com/2012/04/11/sharepoint-item-deleting-event-receiver-deny-delete/ I used below code public override void ItemDeleting(SPItemEventProperties properties) { base.ItemDeleting(properties); using (SPWeb web = properties.OpenWeb()) ...


5

I guess you could always use a site collection token in your URL. ~sitecollection URLs and tokens in SharePoint 2013 If that don't work out for you, this blog post has a lot of great examples when working with masterpages and references. Use Site Url in SharePoint Update Try using a scriptlink instead. I'm unsure if encoding is needed thought. Try to ...


0

I would configure the lookup column in the Task list to pull over the Title field and Description if possible. Then I would create a view group by project, with any applicable fields you want, filtered by Assigned is equal to [Me].


3

Those are not log files, it's your actual search index. It is recommended to move the index to it's own drive so that the index (or any other log files) cannot consume all disk space on the C drive. Moving the index means that you need to clone the search topology and then move the clone to another drive. This is kind of a complicated procedure as you have ...


0

The following example demonstrates to update SP.FieldChoice field properties: Referred from SHAREPOINT 2013: How can I read Site column contents and modify them via javascript csom function updateFieldChoice(fieldTitle,choiceValues,success,failure) { var ctx = SP.ClientContext.get_current(); var web = ctx.get_web(); var fieldChoice = ...


0

Found a solution myself: Made the field a Lookup field and added the entries the following way: <option value="ItemId">ItemTitle</option> Works perfectly.


0

Me too facing the same issue what lenin was facing."Server was unable to process request. ---> Attempted to perform an unauthorized operation" error for any operation using USerProfile service. Code for Cookie: string strAuthCookie = credentials.GetAuthenticationCookie(targetsite); userprofileservice.CookieContainer = new CookieContainer(); ...


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 ...


1

It behaves that way because that is how the search display template works, if it has a title, it shows it, otherwise it falls back to the file name. Title is by far one of the highest ranking priorities in the search algorithm. If you find your results lacking, giving documents accurate title is the best way to boost relevancy. Name is the file name, title ...


1

Use SharePoint:SPSecurityTrimmedControl with PermissionsString="FullMask". Then only users with full control or site collection administrators will be able to see the Gear icon for site actions, but this will hide all site actions menu . <SharePoint:SPSecurityTrimmedControl ID="SPSecurityTrimmedControl1" PermissionsString="FullMask" runat="server"> ...


1

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 ...


0

I provided code to use jQuery FullCalendar for a previous issue: Fetching items from sharepoint list and attaching in Fullcalendar with JSOM Let me know if you need help with that code. I updated the code to strip out most of the fullcalendar stuff so you can use this code for just about any calendar that accepts a JSON array. You just need to modify ...


1

It's mostly likely because you already have an instance of the SPList (from another context) before you try to execute the deletion of an EventReceiver. That's why the ThreadAbortionException is thrown. Instead of sending in the list, send its name instead and get the list inside the RunWithElevatedPrivileges codeblock. private void ...


2

I would try the following: Get the List again from the elevated Web instead of the instance you pass to this method. Try searching your eventreceiver additional by assembly or classname to make sure you don't delete some SharePoint internal Receiver. finally{ web.AllowUnsafeUpdates = false;}


0

Exact same think is happening to me - from what I have read it is due to the fact the site is custom. I have updated the forms via site ID and URL and they are now working fine but the 2013 workflows are not working. The old workflows have no list association. Researching a way to resolve this but nothing as yet.


0

I see you are using an on-prem version, so I suggest using out-of-the-box ways of achieving this. In the masterpage there should already exist tools to help you achieve this. In SharePoint 2010 (I haven't fooled around with Masterpages in 2013 a lot) the way to solve what you are asking for was to do this: <div name="onetidProjectPropertyTitle"> ...


1

Mark, See if this can help you. If you are writing the custom code this can set you the starting point.


1

In the View Settings: Add the Created and Modified dates to your view open the Group-By section and group by the your date field. sort Descending Open the (View) Totals section (below the Group By) and Total by Count for your date field


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

In my experience you need to emulate what you get when you do a read (which you can see using a tool like Fiddler). In your case the code would be: var someNumbers = [4, 5]; var itemMetadata = { '__metadata': { 'type': archivo.d.ListItemEntityTypeFullName }, 'GerenciaId': $('#gerencia').val(), 'Planta_AreaId': $('#planta').val(), ...


0

You are right that it should be an array - array of ID's of the referenced items. Try the following: var someNumbers = [4, 5]; var itemMetadata = { '__metadata': { 'type': archivo.d.ListItemEntityTypeFullName }, 'GerenciaId': $('#gerencia').val(), 'Planta_AreaId': $('#planta').val(), 'Tipo_ArchivoId': $('tipoarchivo').val(), ...


0

Group the view by the 'last modified' date - it will group on the date only, not including the time. The 'header' for each group will show the counts - if you set it to start in collapsed mode it will be easier to see the totals. As far as checking whether they are modified or new, you can check to see whether Modified is equal to Created. Can't do that in ...


0

How about something like this #s4-titlerow { margin-top: 0px; height: 50px; background-color: #DBDCDE; padding-top: 19px; padding-bottom: 28px; position: fixed; width: 100%; margin-bottom: 0px; z-index: 1; top:65px; } #s4-workspace { margin-top: 97px; }


0

I don't know if you can check a list by ID, but you can check the "BaseTemplate" property. SPList list = web.Lists["List ID"]; SPListTemplateType type = list.BaseTemplate; if(type == SPListTemplateType.Tasks){ //Do something for a Task List }else if(type == SPListTemplateType.Survey) { //Do something for a Survey List } If ...


0

You should be able to get it using Object-Model-Browsers like SharePoint-Manager 2013 (available via Codeplex) But I don´t know, if your list gets a custom templateId at all, if you are generating your template using the "Save As Template"-Option via the GUI. If it does, however, the base List, from which you generated the template will still have it´s ...


1

You can do that by edit the current view "Task Summary" and add your custom field, like this:


0

If you open both document libraries in Explorer and drag and drop the files from one Explorer window to another, the version history will follow the document. This is different from copy-paste where you only get the latest version of the document.


1

As Client Side object model runs with the current user credentials and you mentioned that the farms are on different AD's altogether. You'll need to manually provide some credentials who have access to the farm from which data needs to fetched. Either you can ask the user for credentials in a popup or you can manually give them (Security Risk). Cross Site ...


1

SharePoint provides a Custom Action class, please read SP.UserCustomActionCollection Class. var context = new SP.ClientContext.get_current(); var list = context.get_web().get_lists().getByTitle("stackoverflow") var customAction = list.get_userCustomActions().add(); customAction.set_location('CommandUI.Ribbon.ListView'); var uiExtension = ...


0

If you have enough permissions on the source and destination lists you can either use Managed CSOM from a console application or JavaScript CSOM from any web page to achieve this. if you are running the code from the same active directory (AD) of source list or destination list and you have enough permissions on both the lists you got to pass the ...


1

Please include Microsoft.SharePoint.Client.Runtime.dll in your project.



Top 50 recent answers are included