SharePoint 2010, Save As Site Template And Event Reciever Feature - sharepoint-2010

I have an event reciever feature on my SharePoint 2010 site where it runs when a survey is completed or is about to be deleted or updated. When I save my site as site template, the event reciever feature is activate before I perform the save. Now when I create a subsite using the site template that I just created, I notice my event reciever feature is called because I have code in the ItemUpdating event that displays an error message telling users that they can not edit a survey response, this message appears when I try to create the new subsite. Should I deactivate the feature before I save the site template?

Yes. The template will also contain the definition of event receivers that are registered when you save the template. If you deactivate your feature you remove those event receiver registrations, and so your template won't contain those receiver registrations.
It's one of the awkward things about creating site templates in 2010 - you've gott pay attention to what features are active.

Related

Outlook Forms: Recipient does not receive form, only message body //How to store form's data in an email?

I am currently trying to create a form in Outlook. I want to be able to send this form to different people so that they can make changes to the form and send those changes back to me as a response.
I have a published form in the meantime. My current problem: The recipient does not see the form until he "undocks" the email from the Outlook app and the changes made there are not transmitted to me; I just get an empty form. How or where can I save this data that the recipients enter? I am grateful for any help!
The form definition includes all the fields and the code that you add to the form. As a general rule, publish the form definition to a forms library instead of sending the form definition with the item. If you cannot publish your form to a forms library, you can select the Send form definition with item check box on the Properties page so that other users can see the form pages when they receive items that are composed by using the form.
Forms that you only intend to use once and not publish are referred to as one-off forms. Because of security concerns with one-off forms, users might not see the form correctly when they open items sent to them with a one-off form. In this case, sending the form definition with the one-off form provides the necessary information required to display the form correctly for the users.
To change how users reply to your form, click the Actions page. The Actions page lists the default Reply forms that are available. You can also add your own custom Reply forms. For example, forms based on a new email message have built-in Reply, Reply to All, Forward, and Reply to Folder forms. When users receive your form, the form contains buttons and menu commands so that users can respond to the form. You can disable some or all of these default forms and set attributes that define how these Reply forms appear.
Read more about that in the Create an Outlook Form section of MSDN.

Outlook add-in - Trigger JS function to execute on selecting recipient

I would like to trigger a task pane to open when the user selects/changes the 'To' recipient for my Outlook add-in.
I have found the code for wiring up the RecipientChanged event:
Office.initialize = function () {
$(document).ready(function () {
Office.context.mailbox.item.addHandlerAsync(Office.EventType.RecipientsChanged, itemChanged);
});
However, I want this code to be triggered on 'startup' of composing or replying to an email as opposed to having to trigger the task pane to from a ribbon button.
Feels like I am looking for the entry point to add this event wiring to.
I am using Outlook 365 latest for this.
thanks
This is not possible today. We track Outlook add-in feature requests on ourĀ user-voice page.
It looks like the feature you want has been requested by others already. Please upvote the existing request. Feature requests on user-voice are considered when we go through our planning process.
This is possible with event based activation of your outlook adding
Please refer to this document

Outlook 2013 customization and integration in exchange online

I want to customize the appointment window used in Outlook. I want add few custom fields. I am using VSTO (VS2013) to develop this addin.
So far I have added a button in ribbon of appointment tab. On click of which I am opening a new form with custom fields. Now when user completes the form and other appointment details and appointment is saved then along with all appointment data, custom data entered by user should also get emailed to recipients.
And also that custom data would be stored in Exchange, and later that data can be queries to generate report.
So my question is - how do override the save appointment event so that I can add additional data in appointment and also how do I save it to exchange online using office 365.
Please advise.
Thanks.
When you are using an Exchange account which is the case with Office 365. The UserProperties of an Outlook item is kept in Exchange.
You can persist the custom data in UserProperties
If you want to Save your custom data when the appoitment is saved. You should put an event handler in the AfterWrite event. See AppointmentItem event list.

Automatically insert email signature into Outlook Meeting Invite

I have been searching the web for a way to do this but no such luck. My goal is to save a meeting agenda template into an email signature which would be inserted into every meeting invite created by me.
Looking for some clues on how to do this?
Outlook 2010 and newer include the form designer.
File -> Options -> Customize Ribbon, then, in the Right Side pane, click to turn on the Developer Tab.
From there you can design Meeting Request template to your specification.
Then, to use it, you will select:
New -> Meeting Request Using -> (Your Custom Template) from the Outlook Home tab.
You can handle the ItemSend event of the Application class where you can check out the message class of the outcoming Outlook item and change the message body if required.
Think you will find the Getting Started with VBA in Outlook 2010 article helpful.

Document Library- Item Event Listener

I have created a Document library in SharePoint 2010 site. Now I want to execute some code whenever new document is added to this Document library.
How do I implement this? Do I need to implement Item Event Listener? and how this Item Event Listener will be connected to Document library. Can I call a Web service into Item Event Listener?
Be careful reading links that pertain to sharepoint 2010. Sharepoint 2007 links may contain out of date logic.
In how they dispose of SPSite/SPWeb objects
Not using properties.Cancel
EventFiringEnabled instead of DisableEventFiring()
http://msdn.microsoft.com/en-us/library/ff728093.aspx
http://msdn.microsoft.com/en-us/vstudio/Video/ff623003
For binding the receiver to a list
http://social.technet.microsoft.com/Forums/en-US/sharepoint2010programming/thread/19d9ccac-0bfd-4923-8518-8decedc4617d
And it you have the permissions right, you should be able to do most things in an event receiver. Look into elevating the user context.
http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.spsecurity.runwithelevatedprivileges.aspx