Hello,
I’m looking for a way to add an attachment within a PowerShell-action. I’m having an action “Run a PowerShell script” where I’d like to add an attachment to the currently running instance with the help of a WebCon REST API call. The problem is that while processing actions WebCon locks down the instance and I couldn’t find a way to make any changes to the process.
I use the parameter “forceCheckout=1” – that works fine as long a user is editing the form but fails when called from inside a PowerShell action.
I see two options there:
1) I could do it with an asynchronous PowerShell process and upload the attachment when WebCon has finished processing actions, but this is very error prone and error handling is not possible within the action.
2) Create a static “technical” instance and upload the document there. After that I can move the document to the current instance with the help of an “add attachment” action.
Is there a better solution for adding an attachment within a PowerShell-action?
What I really want to do is copy documents to/from SharePoint Online. While there are plenty of SharePoint actions in WebCon, the connection to SharePoint Online with a technical user is inappropriate for us. In my opinion all these operations should be done in the context of the currently logged in user.
BTW: We are still on WebCon version 2023.1.2.44. There might be better solutions in the latest version, though I could not find any in the documentation.
Thank you for your help!
Balint