Étiquette : javascript

Capacitor Plugin for HTTP requests with self-signed SSL certificates

I’m using CapacitorJS for easy development with Android. I needed a way to do an HTTPS request to a box that uses self-signed SSL certificate. To accomplish it, I created my own capacitor plugin. See this wiki page for details: https://github.com/Aymkdn/assistant-freebox-cloud/wiki/Capacitor-Plugin-for-HTTP-requests-with-self-signed-SSL-certificates

SP.Utilities.Utility.SendEmail returns « The e-mail message cannot be sent. Make sure the e-mail has a valid recipient. »

With Sharepoint you can use SP.Utilities.Utility.SendEmail to send email in JavaScript, however you could receive the below error: « The e-mail message cannot be sent. Make sure the e-mail has a valid recipient. » After searching the web, I found the solution: instead of using an email address for the recipients you have to use the userDomain […]

Remove custom properties/metadata for an Office document [javascript]

I have this document library on Sharepoint where I have one custom column called Metadata and that is a lookup to another list on my Sharepoint. When the users download an Office document from this library and then re-upload it we could have the below error message: There is at least one lookup column that […]

How to delete a document locked by another user in Sharepoint using JavaScript

When you open a file from Sharepoint, it will receive a short term lock that will prevent others to change some properties on the file. This protection can be useful, but also very annoying, for example when the file is not closed properly, then the lock could stay « forever ». There are many posts on the […]

Overwrite the Created field for a Sharepoint list item

Sharepoint provides automatic fields, like « Created » that contains the creation date of a list item. It’s a readonly field. You could use a webservice to change the ReadOnly property in order to overwrite its value. Using SharepointPlus the code is: // don’t change the below information // the details about this field are found using […]

Change a « Choice with Fill-In » field into a magic dropdown [Sharepoint]

Sometimes you want to modify the options for a dropdown box by removing some existing options, however you want to be able to keep these old values for reporting or whatever reasons. Below is a way to do it by using jQuery and SharepointPlus. It will hide the « Specify your own value » stuff, and add […]

Trigger an event when a file is uploaded on Sharepoint 2013 by drag and drop

If you want to trigger an event after a drag&drop a file for an upload operation on Sharepoint, then you’ll have to add some JavaScript into your page. // we need to make sure sp.core.js is loaded SP.SOD.executeOrDelayUntilScriptLoaded(function() { window.UploadFinishFunc=function(b, a) { typeof g_currentControl.postUploadFunc == « function » && a.status != UploadStatus.CANCELLED && g_currentControl.postUploadFunc(a.files); a.status != UploadStatus.CANCELLED […]

Adding a custom action to a callout in SharePoint 2013

This article has been VERY useful. But I wanted something lightly different: I wanted to add a custom action, but also have the « EDIT » button (but not the « SHARE »), and to use the current item info for my custom action. Here is the result: // source: https://www.eliostruyf.com/adding-a-custom-action-to-a-callout-in-sharepoint-2013/ // add a special callout action for our […]