1

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

.

1
  • 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
    Commented Oct 24, 2012 at 16:31

3 Answers 3

1

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.

1
  • Hi Dmitry Kozlov: Thanks for quick reply. Can you suggest me any sample code or documentation. Am new to sharepoint coding..help me..
    – chinna
    Commented Oct 15, 2012 at 12:36
1

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

0

using design workflow you can archive.

1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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