cancel
Showing results for 
Search instead for 
Did you mean: 
cbeene
Nintex Newbie

How to delete list attachment

Jump to solution

Can anyone tell me how to delete a list attachment in O365?  I cannot find any reference on how to do this.  I can copy an item from a line item to a separate list, but cannot delete the file from the line item after.  Help.

Labels: (1)
Reply
1 Reply
cbeene
Nintex Newbie

Re: How to delete list attachment

Jump to solution

Hey all, 

I figured out how to do this on my own and thought I would share for posterity.  I used an HTTP webservice to move the attachment in the first place using the URL------- (‍{Workflow Context:Current site URL}‍_api/web/lists/GetByTitle('‍{Workflow Context:List Name}‍')/Items(‍{Current Item:ID}‍)/AttachmentFiles) ------  I also used the "HTTP Get" request type in the web service action.  This worked great.

I then copied the web service action and placed it at the end of the WF.  I then added "getByFileName('‍{Variable:AttachmentFilename}‍')" (for a final URL of   ----‍{Workflow Context:Current site URL}‍_api/web/lists/GetByTitle('‍{Workflow Context:List Name}‍')/Items(‍{CurrentI tem:ID}‍)/AttachmentFiles/getByFileName('‍{Variable:AttachmentFilename}‍') -------

I then changed the Request type to "HTTP Delete". 

No other changes to request headers or content. 

It took me hours to figure out, but the more more I learn about REST lingo, the more it makes sense.

Reply