Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I am new to SharePoint so please be gentle...

I am trying to create a calendar for a school which has multiple overlays...the reason is each overlay list will have the permission for the intended audience, be it staff or pupils etc...

I am also making a submit entry point so staff can view the fact they have submitted a request which then is copied to another list named pending, this pending list has a few more fields for the approver to edit then once finished modifying the item is then copied to the right calendar list for the overlays...

So here is the fun part...if the approver rejects the event I use the workflow to email the event creator, delete the item from the submit list and then delete the item from pending list...this worked when I used custom lists but now I am using built in calendar list and have as strange result...

My onchange pending list workflow does the following

if Status eqauls reject
  email creator (DOES NOT WORK)
  delete from submit list where submitid equals currentitem submitid (WORKS)
  delete from current list (DOES NOT WORK)

Oh and the submitid value is unique, I create that on the submit list with an oncreate workflow that copies ID to sumbmitid column

The above workflow worked if using custom list but not since I used calendar list...also if I remove actions and try each one on its own then they all work...for some reason when combined only the one deletion works

one more thing, If I am approaching this whole idea in the wrong way then I am happy to be told...will post any more info that is needed to have this moving forward

any pointers appreciated...thanks

share|improve this question
    
OK I know its not the best solution but I have a workaround with workflows...I set a new field in the list to either awaiting approval or awaiting deletion...in the modify list workflow I used a simple if field = awaiting deletion then delete item in current list...this works as long as its the only action to perform inside this if statement...Sorry to post my own workaround as I know this site is not about self solutions but I thought I should mention it for users to see...still open for better solutions to :) –  Rodent43 Mar 2 '12 at 14:38

1 Answer 1

I can only suppose that you cannot delete the item on which you workflow is running from the workflow itself. But I have another note for you - if you using a workflow only for automatic action where there's no long running operation like interaction with users than it's more appropriate to create an event receiver (here's the another example) for the list - it's designed to make such a short operations. You need to create an event receiver, handle ItemEdited event and do execute your delete logic there.

share|improve this answer
    
thanks for the response...the interesting thing is when I created the same lists with customList it worked fine...as I mentioned, I am new to this so I am using Desigern mainly so I will have a look in to Visual Studio and event receiever...workflow seemed easy solution when I was customList but the powers above me requested recurring event as part of the entry...thanks –  Rodent43 Mar 1 '12 at 15:56

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.