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 have a requirement as fallows:

I have a document library with four columns, whenever the value in fourth column changed then only alerts will send to users with frequency (day , week etc).

How can I achieve the above requirement.Can any one suggest me the possible ways of doing it

for the above library alerts were setted whenever Existed items are changed. I need to send alerts only when fourth column value is changed? Can we stop the default alerts? and send only when fourth column is changed.....

Thank you

.

share|improve this question
    
Are you creating a state machine workflow? Alerts may not be the solution. What is the next step after column 4 is changed? Someone is emailed and then... –  ghangas Oct 24 '12 at 16:31

3 Answers 3

Chinna,

You can create a new event receiver from Visual Studio.. and in ItemAdding event you can do something like this:

public override void ItemAdding(SPItemEventProperties properties)
{
   base.ItemAdding(properties);
  try
    {
        bool sendAlert = false;

        if (properties.ListTitle == "Open Positions")
        {
            if (properties.BeforeProperties["fieldName"] != properties.AfterProperties["fieldName"])
            {
                sendAlert = true;
            }
        }

        if (!sendAlert)
        {
            //reference the below article for emailing OR if you want to keep this alert to be sent by TimerJob - you can add this alert to a custom list
        }
    }
    catch (Exception ex)
    {

    }
}

Reference this article on sending emails

share|improve this answer

using design workflow you can archive.

share|improve this answer
    
spadvancedalerts.codeplex.com check this url –  Nagaraju Pattem Oct 16 '12 at 12:01

You have to develop custom event receiver on item updated event. There you will check whether fourth column changed or not and send e-mail with SPUtility.SendEmail method if it has been changed.

If you need daily or weekly subscriptions, you have to create timer job that will make multicasting based on the event log. Event log will be filled by event receiver.

share|improve this answer
    
Hi Dmitry Kozlov: Thanks for quick reply. Can you suggest me any sample code or documentation. Am new to sharepoint coding..help me.. –  chinna Oct 15 '12 at 12:36

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.