sharepoint

Download latest file from SharePoint Document Library

。_饼干妹妹 提交于 2019-12-23 05:35:06
问题 Caveat: Cannot use Microsoft.SharePoint.Powershell Snap-in. I want create a PowerShell script that will search a SharePoint document library for the most recent file. https://sharepoint.url.com/site/Your_Site_Name/Sub_Site/SharedDocuments/ I am trying to incorporate the Get-ChildItem to search for the latest file. Here is an example: $fromfile = "https://sharepoint.url.com/site/Your_Site_Name/Sub_Site/SharedDocuments/File_name*" $tofile = "c:\temp\temp_file.xlsx" $latest = Get-ChildItem -Path

Office365-REST-Python-Client Access Token issue

爷,独闯天下 提交于 2019-12-23 05:19:56
问题 I've found many examples of using the Office365-REST-Python-Client however, none of them are correctly obtaining the access token. I've registered an app under the Azure Portal, granted it API permissions using 'Application permissions', created a secret and used the client_secret and client_id in my settings dictionary to use in the below code. def read_folder_and_files(context, list_title): """Read a folder example""" list_obj = context.web.lists.get_by_title(list_title) folder = list_obj

Client-side SharePoint PowerShell - Get list items - The collection has not been initialized

与世无争的帅哥 提交于 2019-12-23 05:14:25
问题 On SharePoint 2013, I am trying to get list items, with client-side SharePoint PowerShell. Even for field Id or Title, I encounter this error: The collection has not been initialized. I don't know how to include fields. I find many exemples in C# or JavaScript but none in client side powershell. Here is my code (it returns correctly the number of items): Function New-Context([String]$WebUrl) { $context = New-Object Microsoft.SharePoint.Client.ClientContext($WebUrl) $context.Credentials =

Can't find workflow deployed as WSP solution (when I deploy it from VS it works)

烈酒焚心 提交于 2019-12-23 04:51:09
问题 I am new to SharePoint, sorry if answer to my question is obvious. I am trying to deploy my very simple workflow as WSP package, it deploys without errors, I activate it, but I can't find my workflow and associate it with list. Could you help me, please, what I do wrong? I do it so: Create empty project Choose trust level as a Farm solution Add State Machine Workflow Choose list Workflow Associate workflow with list Task Create simple workflow Press CTRL-F5 in VS2010, and see that WF appears

Why I am not able to authenticate with Microsoft Graph Explorer through Sharepoint Custom Web Part only in Edge Browser

倾然丶 夕夏残阳落幕 提交于 2019-12-23 04:41:40
问题 I have deployed a custom web part on sharepoint online, in which I am authenticate with Microsoft Graph Explorer. It is authenticated through Sharepoint Custom Web Part successfully in Chrome , IE and Firefox but not authenticated in Edge . In Edge I've getting below error: description: "Invalid argument" message: "Invalid argument" number: -2147418113 stack: "TypeError: Invalid argument at Anonymous function (https://spoprod-a.akamaihd.net/files/sp-client-prod_2019-05-31.012/sp-pages

Sharepoint Client Object Model The property or field has not been initialized

≡放荡痞女 提交于 2019-12-23 04:41:20
问题 I have a C# program that manages Sharepoint lists using the Sharepoint Client Object Model. Occasionally we will have server issues which will prevent the program from accessing the sharepoint server. I am using a helper class to run the ExecuteQuery method and have exception handling to continue to execute until there is no exception. private void ExecuteContextQuery(ref ClientContext siteContext) { int timeOut = 10000; int numberOfConnectionErrors = 0; int maxNumberOfRetry = 60; while

SharePoint 2010: Set field value from query triggered by choice box selection

别来无恙 提交于 2019-12-23 04:30:56
问题 How do you link a form field to a choicebox selection so that the field's value is set by the information referenced by the ID of the choicebox selection? I have a choicebox in a custom list form which is bound to a "Client" list which contains client names, IDs, reference numbers, addresses, etc. The choicebox displays the client name and has the selected value set to ID. I would then like to query the Client list by the selected ID to populate form fields with Client Name, Client Address,

SharePoint 2010: Set field value from query triggered by choice box selection

夙愿已清 提交于 2019-12-23 04:30:32
问题 How do you link a form field to a choicebox selection so that the field's value is set by the information referenced by the ID of the choicebox selection? I have a choicebox in a custom list form which is bound to a "Client" list which contains client names, IDs, reference numbers, addresses, etc. The choicebox displays the client name and has the selected value set to ID. I would then like to query the Client list by the selected ID to populate form fields with Client Name, Client Address,

Use sharepoint cross-domain javascript library to consume REST API from localhost

自闭症网瘾萝莉.ら 提交于 2019-12-23 04:26:11
问题 I try to consume the sharepoint rest API from an application deployed in localhost. The sharepoint site is hosted in Sharepoint 2013 online. For that purpose I use the javascrpt cross domain library. I get an example here https://github.com/OfficeDev/SharePoint-Add-in-REST-OData-CrossDomain. My application is a full static website and I don't have VS, so I tried to figure out the Add In authorization. I go to the _layouts/15/appinv.aspx page of my site to give the authorization of third party

Opening an Excel document from SharePoint using PowerShell

我是研究僧i 提交于 2019-12-23 04:20:17
问题 I'm trying to open an Excel workbook from SharePoint using PowerShell. I'm not loading the SharePoint snap-in—I do not have it. When PowerShell tries to launch the workbook, SharePoint prompts for credentials. The problem is that we're trying to schedule the script, and we would like the script to have an SSO-like experience. Here's the MWE: $Excel = New-Object -ComObject Excel.Application $Workbook = $Excel.Workbooks.Open(http://site/file.xlsx) $Worksheet = $Workbook.Sheets.Item(