sharepoint-2013

Not able to get Lookup field value in Sharepoint 2013 online Custom List Using SPD

痴心易碎 提交于 2019-12-08 11:04:26
问题 I have one lookup column named "ActivityStatus" and it has two values. and I just want to check that lookup field value on Presave Action. Below is my code but it is not working. <script type="text/javascript"> function PreSaveAction() { alert("Inside"); var elm = document.getElementById("ActivityStatus"); alert(elm); if (elm == "Incomplete" || elm == "Inprogress") { document.getElementById("ActivityStatus").style.display='none'; alert("Previous Activity is in Progress..."); return false ; }

How to retrieve sharepoint 2013 list data using JQuery or JavaScript and Fill DropDownList?

这一生的挚爱 提交于 2019-12-08 10:13:32
问题 I am trying to retrieve list data using JavaScript. But something goes wrong. I am trying to debug the code but I am not able to understand that thing. Following is the JavaScript Code: ExecuteOrDelayUntilScriptLoaded(PopulateDepartments, "sp.js"); var _ctx = null; var _web = null; var _allItems = null; function PopulateDepartments() { debugger; _ctx = SP.ClientContext.get_current(); _web = _ctx.get_web(); var list = _web.get_lists().getByTitle("ServiceType"); var query = new SP.CamlQuery();

Getting ALL users from SharePoint online tenant and set userprofile property via Powershell

丶灬走出姿态 提交于 2019-12-08 08:55:50
问题 UPDATE: Vadim has a good answer below but this is how I did: namespace UserProfile.Manipulation.CSOM.Console { class Program { static void Main(string[] args) { searchAllUsers(); } private static void searchAllUsers() { string siteCollectionUrl = "https://tenant.sharepoint.com/sites/intranet"; string tenantAdminLoginName = "adminlogin"; string tenantAdminPassword = "Password"; using (ClientContext clientContext = new ClientContext(siteCollectionUrl)) { SecureString passWord = new SecureString

Add event to calendar on SharePoint through REST API

和自甴很熟 提交于 2019-12-08 05:34:29
问题 I'm trying to add a calendar event to a SharePoint Calendar through REST API but i can't seems to find the relevant resources to achieve this. If i understand correctly, the calendar in SharePoint is a List of events object, as such I should be able to add the event via ListItem object? Sorry if this sounds wrong as I'm not familiar with SharePoint structure. Thanks 回答1: This is the example for OAuth token Authentication but REST part is anyway like this. var dataObj = { "Subject": "Birthday

Sharepoint REST API filter empty LookUp field

怎甘沉沦 提交于 2019-12-08 03:45:15
问题 I'd like to know how I can filter ListItems in SharePoint rest API (2013) on empty lookup. On my list items, there is a lookup (single value, not required) and i'd like to get all items where lookup is empty (blank). _api/web/lists/getbytitle('MyList')/items?$select=Id&$expand=MyLookUp/Id&$filter=?? Does someone has a clue ? Thx 回答1: REST API in SharePoint 2013 does Not support null values for filtering on list item queries . However you can combine CAML query with REST API to get the

Add event to calendar on SharePoint through REST API

心已入冬 提交于 2019-12-07 08:28:29
I'm trying to add a calendar event to a SharePoint Calendar through REST API but i can't seems to find the relevant resources to achieve this. If i understand correctly, the calendar in SharePoint is a List of events object, as such I should be able to add the event via ListItem object? Sorry if this sounds wrong as I'm not familiar with SharePoint structure. Thanks This is the example for OAuth token Authentication but REST part is anyway like this. var dataObj = { "Subject": "Birthday Party" "Body": { "ContentType": "Text", "Content": "Birthday Party for Cathy", }, "Start": { "dateTime":

Extracting Files from Sharepoint 2013 WSS_Content Database

為{幸葍}努か 提交于 2019-12-07 02:42:35
问题 Sharepoint 2013 stores documents in the WSS_Content database in a table called DocStreams. Up until Sharepoint 2010, files where stored in a single row in a VarBinary column. Since Sharepoint 2013, files are stored in multiple rows using Shredded Blob storage. Does anyone know how I can piece together the files from the shredded storage in c#? I have found many exampled online to extract files from SharePoint 2010 and earlier but they only support a files content being stored in 1 row. 来源:

Entity Framework 6 with Sharepoint 2013

岁酱吖の 提交于 2019-12-06 15:04:37
问题 I tried without success to get a SharePoint 2013 application page or web part to work with Entity Framework 6 (6.0.1 to be exact - the version installed into Visual Studio 2012 by default using NuGet at time of writing). My code was very simple for test purposes, just reading data from one table. I could install the package just fine, create models, see that the they were properly configured etc, no problem - but whenever I tried to load the page I got the error: Event code: 3008 Exception

Error with Dispatcher.BeginInvoke

早过忘川 提交于 2019-12-06 10:41:43
问题 I am trying to add an item to a sharepoint list but when i try to save my changes im getting this error with my Dispatcher.BeginInvoke 'Windows.UI.Core.CoreDispatcher' does not contain a definition for 'BeginInvoke' and no extension method 'BeginInvoke' accepting a first argument of type 'Windows.UI.Core.CoreDispatcher' could be found (are you missing a using directive or an assembly reference? ctx.BeginSaveChanges( (IAsyncResult result) => Dispatcher.BeginInvoke( () => ctx.EndSaveChanges

Upload document to Sharepoint 2013 Online using webservices

杀马特。学长 韩版系。学妹 提交于 2019-12-06 08:22:47
问题 I have a client who is implementing customer portals in Sharepoint 2013 Online. The current program distributes documents to the customers by mail. Now we have to upload the documents to the customer portal. I try to use the copy webservice in sharepoint. I created a test project and added the webservice as Web Reference and wrote the following testcode: static void Main(string[] args) { string baseUrl = "https://mycustomer.sharepoint.com/sites/"; string customer = "customerportalname";