As the final step in many processes - especially with in place records - it would be really useful to be able to declare a document as a record in an action.
This is really a pain not having this functionality. I know dear Microsoft want to push using Retention Labels rather than individual site Record settings, but if you are a site owner with IT saying we only support SharePoint sites we build, you are stuck with whatever generic settings were left enabled. If CSOM (Microsoft.SharePoint.Client.RecordsRepository.Records) has it , why isn't there also a SharePoint REST API function call?
I just want to lock a list item from edits/deletes after it goes though a Flow approval process. Why is that so difficult to implement?
Looks like there is no REST API for declaring document as a record. Thus, it is impossible to use Call SharePoint action from Power Apps.
The first workaround is described in this Stackexchange discussion. Create an Azure Function that uses C# code and CSOM to declare a document as a record. Then call this Azure Function from your flow.
Condition: Content Approval Status is equal to Approved (if No do nothing, otherwise do the following)
Send an HTTP request to SharePoint (to break security inheritance): POST this URI: _api/web/lists/getByTitle('<your list name>')}')/items(<item ID>)/breakroleinheritance(copyRoleAssignments=false, clearSubscopes=true)
Grant access to an item or a folder: grant only read access for users
Now that SharePoint 2010 workflows are being retired, this feature needs to be available in flow. We have some SP 2010 workflows that need to be migrated before November 2020. At the moment, the function is only available via CSOM and not even REST api which is a shame.