New answers tagged

0

As stated by Gautam, it is important to take into consideration what timezone has been set in the regional settings of your SP site. As per my understanding, if the SP timezone is set as 'America/Los_Angeles' then at the time of saving the item SharePoint will convert the date time you entered in ISO string format like this "2017-12-06T19:00:00Z" and save ...


0

The Answer above is correct. In case you wonder ,how to do it with more than one Property except "Id": You don't need this if you don't specify which Properties to include in the Load, then all will be returned, but if you want to save bandwith, you might want to specify only the necessary properties. Here my Example Code: (Trying to fetch all Documents ...


1

While JSOM is still indeed supported, Microsoft is not working actively on JSOM and is pushing new change via RESTful endpoints. The ability to fetch property bag value is supported via REST API. You can do that as below for your code using jQuery, but you can use any other library that your prefer : $.ajax({ url: _spPageContextInfo.webAbsoluteUrl +...


0

You can get web property bag using JavaScript object model. But make sure SP.js file is loaded first on your SharePoint page. Try using below Code: //wait until client object model dependencies are loaded before executing our code ExecuteOrDelayUntilScriptLoaded(getWebProperties, "sp.js"); var webProperties; function getWebProperties() { var ...


0

You cannot update the list items using JSOM with only Read permission. In order to add/update/delete list items, you should at least have Contribute permissions. For more understanding, check below article: Understanding permission levels in SharePoint.


1

Unfortunately I think the answer is no. The JSOM is great and yes like you say similar to the SP JSOM (same backend processquery, similar syntax etc etc), however the methods all simply map back to the old server side PSI API methods. That is the same for JSOM, CSOM and REST (REST being the unlucky one as not all methods have been mapped). The problem you ...


1

I Guess, you need to load the web with the EffectiveBasePermissions before using it. Try using below code: var web = context.get_web(); context.load(web,'EffectiveBasePermissions'); context.executeQueryAsync(function(){ // Success if (web.get_effectiveBasePermissions().has(SP.PermissionKind.approveItems)) { console.log("user have ...


0

I found the solution Just frame the code using SP like this /*eslint-disable no-undef*/ let itemCreateInfo = new SP.ListItemCreationInformation(); /*eslint-enable no-undef*/ https://github.com/facebook/create-react-app/issues/2974


0

In your success function, you can try something like below: function Success() { var listEnumerator = collList.getEnumerator(); while (listEnumerator.moveNext()) { var oList = listEnumerator.get_current(); var startDate = oList.get_item('DateTimeColumnName'); // 'DateTimeColumnName' is internal name of date field } } You can ...


Top 50 recent answers are included