New answers tagged

0

Try something like this: var fieldColl = list.Fields; clientContext.Load(fieldColl); clientContext.ExecuteQuery(); OR clientContext.Load(list.Fields); clientContext.ExecuteQuery(); Reference: Retrieve all of the fields in a list


0

Please refer below article to Automate add-in/app installation to SharePoint sites using CSOM: https://docs.microsoft.com/en-us/archive/blogs/vesku/automating-add-inapp-installation-to-sharepoint-sites-using-csom Similar post: Installing a root App that will automatically install on newly created sites [Sharepoint 2013]


2

When you call Load, you are only preparing your query. As this article states, in SQL terms think of it of building your SELECT statement. You then call ExecuteQuery() (or ExecuteQueryAsync()), to submit your prepared query to the remote server and retrieve the specified data. The difference between ExecuteQuery() and ExecuteQueryAsync() is whether you ...


0

Yes, we can do this using the export and import of the powerapps package. We need to follow the below steps to do that: Export the app from the source environment Import the app into the target environment Export Process Step 1: Open the PowerApps form in the browser. Go to the Apps tab. Right-click on the Application which you want to move. You will get ...


1

-IncludeSiteCollectionTermGroup will only export terms that are defined at the Site Collection level, not the terms in the managed term store. These terms are usually created when you define fields with custom term sets or when using Managed Navigation. Therefore any terms in the managed term store (that are available across your sites in the tenant) will ...


1

At any circumstances we cannot retrieve more than 5000 items from SharePoint list, so we must use the rowlimit parameter in the camel query, as I see you have already used it. You may optimize your by the below example : What you can do is. You fetch all the items/documents 10,000 and keep it in collection object and query this collection object using ...


0

You can open the .xml file in a text/code editor and do a search & replace with a corresponding user from your second tenant. There are a few main sections that can include users in the provisioning template. If you do not need to provision these you can remove the whole section. These are: <pnp:SiteDesigns /> <pnp:Security /> <pnp:...


0

We will face this issue when we have already created the site with the group and there trying to run the Apply-PnPProvisioningTemplate command- with the new site this issue will not come. In order to work with the current template, we need to do few changes in the PnP template before running the Apply-PnPProvisioningTemplate command. Sample PnP Template: &...


1

The Access Denied error is possibly triggered because the workflow itself doesn’t have permission to edit the list item. Please check if you have Workflows can use app permissions feature activated via Site Settings > Site Features. You can also try writing the workflow actions in App Step in SharePoint Designer 2013 to grant elevated permissions to the ...


1

This error might have come due to the throttling so you can try increasing the value of RetryCount parameter Example : Invoke-PnPQuery -RetryCount 10 Notes : The error what you are getting now, you may not get after sometimes, because throttling error comes when resource utilization in the target connection is high and this is not fixed, this gets ...


2

This will not modify the site at all, it will just export the template No data will be included You must first create a new site (or modify an existing one). You do that by using the command Apply-PnPProvisioningTemplate -Path template.pnp. More details here This will use the current folder, but you can specify where you want it: Get-PnPProvisioningTemplate -...


0

To get into the specific folder we need to use the "GetFolderByServerRelativeUrl" like below: Folder folder = ctx.Web.GetFolderByServerRelativeUrl("Shared Documents"); Sample upload code: ClientContext ctx = new ClientContext("http://sp13"); Folder folder = ctx.Web.GetFolderByServerRelativeUrl("Shared Documents"); string file = String.Concat(Environment....


0

Not sure why it doesn’t work on second installation but here are some references on SharePoint Add-in localization. It should give you the options to choose installation language for the app. In addition, the display language for the app usually goes with the site settings, instead of the installation language option while being added to the site. ...


1

Please give us more information on what the workflow is doing. Offer the workflow steps. Republish the workflow and compare the results. To narrow down the issue: please create a new workflow with just log to history action, check whether the issue exists. Try to start the workflow with other user, compare the results.


0

You may try running the workflow with elevated permission by using the App step action which is available in SharePoint 2013 workflow template. The App step action will not be available by default, in order to get this action available, we need to activate the Workflows can use app permissions site feature. Navigate to Site settings->Manage site features ...


0

You can go to C:\Program Files\Common Files\microsoft shared\Web Server Extensions\15\TEMPLATE\LAYOUTS\, find the AccessDenied.aspx page then customize it based on your requirement. Note: Before you change the files, remember to make a backup for this file. two similar threads for your reference: SharePoint 2013: how to create a custom access denied page ...


0

Try moving the CamlQuery definition out of the loop so you don't have to keep redefining it and then changing the way you are setting the position, dynamically using the returned value instead of using a variable: CamlQuery camlQuery6 = new CamlQuery(); // The RowLimit tells SharePoint to only scan the next 1000 items camlQuery6.ViewXml = @"<View><...


0

So, if you google for "SharePoint CSOM Large Lists", you will find plenty of examples -- but the gist is that in order to query a large list while staying within the ListViewThreshold, you have to set a RowLimit, so that SharePoint doesn't try to scan the entire List in fell swoop, it will only scan the number of items specified by RowLimit. But of course, ...


1

You could use the out of the box feature "Variations" to achieve this. This feature makes content available to specific audiences on different sites by syncing content from a source variation site to each target variation site. You could refer to this article: https://docs.microsoft.com/en-us/archive/blogs/sharepoint_quick_reads/sharepoint-2013-variations-...


0

An event receiver would work, that would have to be a farm solution. If you have access to the server you could also do this by creating a scheduled PowerShell script that checks/updates the lists... I would look into if a simple workflow could do the trick. As your target list is in another site you would have to update that using the SharePoint Rest API ...


0

The thing is that in complex structures you could have multiple terms in the same term set with the same label (e.g you could have Finance under Marketing as well). To just pick the first hit based on the label, you could do this: //.... TermSet termSet = group.TermSets["Contoso Departments"]; TermCollection terms = termSet.GetTerms("Finance", true); if (...


1

The AfterProperties of an event receiver, whether an old-school server-side Receiver or a RemoteEventReceiver, will always only contain the values that were submitted to SharePoint. In the case of an update made via code through one of the APIs, this is usually just the small number of fields that are being changed, most of the other values do not get ...


0

One alternative to @RJ Cuthbertson 's answer to avoid empty try/catch block when testing whether group with that name has already been created: SPGroup group = w.SiteGroups.Cast<SPGroup>().SingleOrDefault(g => g.Name == "The Group Name"); // If it doesn't, add it if (group == null) { root.SiteGroups.Add("The Group Name", member, root.Author, "...


1

Timer job runs under different process, I.e owstimer.exe so in order to debug the timer job we need to attach the owstimer processor under debug menu of process tab in visual Studio,then we need to set the break point where you want in the code file, then press f5 in visual studio. This is recommended in dev environment but while deploying this into the ...


0

Although question is about Sharepoint 2010, if anyone wants to find out the same in the newer versions, we have a direct approach SPContext.Current.Web.CurrentUser.UserToken.IsSystemAccount a boolean flag denoting if the current logged in user is a system account or not


-1

This is the OOTB behavior of SharePoint in the case of ItemUpdated. In my case, there was a custom web part that was updating the item. As mentioned in Handle list item events in the provider-hosted add-in SharePoint behaves a little differently when the item updated event is triggered by a programmatic update: it only includes in the AfterProperties ...


1

According to Microsoft documentation, There is Read-only support for site resources ( and no ability to create new sites) using Microsoft graph. Source: Working with SharePoint sites in Microsoft Graph. Additional: I have read on GitHub (and tried also) that SharePoint Online site will be created automatically if you create a Office 365 group and assign ...


Top 50 recent answers are included