New answers tagged

1

The answer appears to be that this is not possible: https://docs.microsoft.com/en-us/answers/questions/581947/unable-to-update-scripteditor-webpart-csom-powersh.html?childToView=582966#comment-582966 Testing by a Microsoft employee respondent confirms my findings. This may be possible with the snap-in, though I am not running PowerShell on the SharePoint ...


0

This script will get all the editForm webparts and export it to a csv file. From there you can filter down for Script Editor and Content Editor Web Parts in the csv file. To get NewForm or DisplayForm update the script to look at DefaultNewFormUrl or DefaultDisplayFormUrl. Add-PSSnapin Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue #...


0

Try using this: FieldLookupValue courseOffered = item["Course_x0020_offered"] as FieldLookupValue; if (courseOffered != null) { dRow["Course_x0020_offered"] = courseOffered.LookupValue; } else { dRow["Course_x0020_offered"] = ""; } References: How to retrieve lookup values using ClientContext? Get\Set value ...


1

Modify your CAML Query to <Geq> <FieldRef Name='StartDate' /> <Value IncludeTimeValue='TRUE' Type='DateTime' StorageTZ='TRUE'>2021-08-31T22:00:00Z</Value> </Geq> Here, we have added the StorageTZ=TRUE attribute which tells SharePoint to do the comparison using the native storage time zone (UTC time) of the field value ...


0

Yes it is possible. Go through the below link to add retention policy using CSOM https://www.c-sharpcorner.com/blogs/add-retention-label-and-retention-start-date-to-sharepoint-document-using-csom


1

You could add attachment to list item like the below: newItem.Update(); AttachmentCreationInformation attachmentCreateinfo = new AttachmentCreationInformation(); attachmentCreateinfo.ContentStream = new MemoryStream(System.IO.File.ReadAllBytes(@"C:\test.docx")); attachmentCreateinfo.FileName = "test.docx"; ...


0

I came across the same error today, when implementing an CSOM console app that would connect to my tenant. Searching through the net, i came across multiple answers that pointed out tha MFA was the source of the problem. Searching through the cause i found out that an Admin had blocked all of the legacy Login Methods from the Conditional Access Blade in ...


Top 50 recent answers are included