1

In my site collection i have an announcement list. and in my site collection some 600+ sub sites exist. sharepoint admin uploads an announcement into this rootweb's announcement list. now is there any way i can add the same announcement -which has title, description, date time etc .- to all the 600+ sub sites' announcement list?

i know , if i write a list item event receiver i will be able to iterate through each and every subweb of my site collection and add this item into those sub web's announcement list. But, without writing an event receiver and creating and deploying another wsp and avoiding all those headache, is it possible to achieve this requirement

1

If you don't want to use compiled code, what about JS code?

  1. On the new/edit announcement page (or anywhere you want), you could create another button which says sync announcement to subsites. When clicked you can use the JavaScript CSOM to iterate through each and every subweb and add the announcement.

But I would also back up and ask why you need this done? If you just want to display an announcement on every subsite, you could:

  1. Add a content query webpart to display the announcement on each subsite.

  2. Do some JavaScript with a content editor (maybe use angular) to achieve something similar.

EDIT (Reorganized options above with numbers and included more detail below):

  1. So on the editform.aspx (and/or newform.aspx) page, you can edit this page and add a content editor web part or script web part to execute some JavaScript when the page is opened. By using JS, can you create and insert a button anywhere on the page. You don't need any compiled code or a wsp to do this.

  2. If you want to see an announcement from the root site under each subsite, you can add a content by query webpart which would display the announcements from the root site in the webpart. You could then use powershell or something to add this webpart to the homepage of every subsite so they could see it.

  3. Same thing as #2 but instead of using a content by query web part, you can use a content editor or script web part with some JavaScript. I suggested angular because it is the new hotness and you can use it to call the REST API to perform actions. Again, once you have it made for one subsite, you can use powershell or something to add the same web part to all of the subsites.

  • thanks for your reply and your time.As per your first point i need to create a button sync announcement.may i know how to create this button.If I am not wrong, i need to write another custom action to create this button.that in turn results into another wsp and visual studio solution.As per your second suggestion and third can you please elaborate a little bit about the CQWP and using angular js approaches. – userAZLogicApps Mar 1 '15 at 12:03
  • Ok, edited my response above – Steve Lineberry Mar 2 '15 at 13:58
  • Also, can you please explain the business problem you are trying to solve, that would help in understanding your requirements. Thanks. – Steve Lineberry Mar 2 '15 at 13:58
  • 1
    thats a detailed explanation you have provided @Steve. – userAZLogicApps Mar 4 '15 at 14:48

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.