1

In my idea of an IT department adjustment, one person would write up an Announcement and submit it to another person for posting. When that second person approves it, it will be posted as normal, however we would strip out the name of the poster and replace it with something anonymous. We want the basic approval workflow to return it the author upon rejection and become visible upon approval.

We'd prefer not to use a service account (It's a pain to close IE and run it as a different user). Is this possible? If so, how?

It would be easier if we could make the entire Announcement list anonymous (like you can do in Surveys), but I do not see that option.

General Anonymous access is disabled...

  • One question I have regarding your requirements is what are the ramifications if a user is able to figure out the author? Is it ok to just hide the author's name, or does it really important that it truly be anonymous? – Robert Kaucher Feb 27 '14 at 23:29
  • Hiding it is Ok. We hid it on the display form, but alert emails still send out the author's name. – Mark Feb 28 '14 at 16:26
2

You could use an ItemAdded (not adding) event receiver to change the value of the Created By field to that of another account. Or you could do the same thing in the workflow. It just depends on which one makes more sense in your specific scenario.

Some simplified example code.

public override void ItemAdded(SPItemEventProperties properties)
{
    //Set the author field to the "service account's" ID number.
    properties.ListItem["Author"] = 32;
    properties.ListItem.Update();
    base.ItemAdded(properties);
}

So to fit your exact requirements:

  1. Create a hidden field called "Original Author" or similar. When an Item is added, set the value of this field to that of the Author field.
  2. Update the Author field to the "service account".
  3. When the item is approved, set the Author field back to its original value.
| improve this answer | |
1

A simple SharePoint Designer workflow could acomplish this for you:

(pseudo workflow steps)

  • Open up SPD with the service account (just this once)
  • Named user submits new announcement to the list (requires approval).
  • Approval process (n steps..)
  • On Approval, announcement column values copied to workflow variables
  • Delete the announcement
  • Use an Impersonation Step and create a new Announcement with the workflow variables and approval set already.

This way, the user experience is very familar and the new announcment will be posted using the service account as SPD uses the Workflow author account for the new items in the list.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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