SharePoint 2010 visual studio sequential workflow reminder email

Hi ,

I want to send reminder email in sequential workflow visual studio work flow sharepoint 2010. Any code sample if available, please share the same

April 29th, 2015 10:21am

My requirement is to send a reminder email on daily basis to the assignee until the task has been completed. I
April 30th, 2015 12:13am

then create workflow on the tasks list and inside put this loop and pause conditions or instead create timer job runs daily and check task completion and send the email
Free Windows Admin Tool Kit Click here and download it now
April 30th, 2015 11:28am

Hi 

thanks for your response !!

I am trying to send 3 reminder email. My scenario is I have a document library , where any document uploaded by user, i need to send an information email , asking for approval from another user. In that , 3 reminder emails i need to send the user who will approve the document.

Document library has a Status field, if the status field value equals to "Pending" I need to send reminder email. I am reading that field value and trying to send an email. I am able to send reminder email, but I am not able to stop the reminder emails after 3 emails.

The second problem is, if Status field changed to either "Rejected" or "Approved". I have to send information to the user who had uploaded the document.  In this case , my emails are not going, I tried to debug but no luck.

I am not creating any task list for this, as i am directly giving edit access to the user who has to approve.  User can go directly to the doc lib and edit the status either approve or reject.

default status is pending.

Is there a way to limit the delay activity to a certain number ?

In the second ifelse condtion when the status has changed , why emails are not going ?

Code is as below

private void codeActivityApproveReject_ExecuteCode(object sender, EventArgs e)
        {
            string approvalStatus = workflowProperties.Item["Status"].ToString();
            #region "Manager Group"
            SPGroup approver = null;
            string mngr = workflowProperties.Item["Plant"]";
            foreach (SPGroup g in workflowProperties.Web.Groups)
            {
                if (g.Name.Contains(mngr))
                {
                    approver = g;
                    break;
                }
            }
            StringBuilder sendTo = new StringBuilder();
            foreach (SPUser user in approver.Users)
            {
                sendTo.Append(user.Email);
                sendTo.Append(";");
            }
            #endregion

            if (approvalStatus == "Approved")
            {
                subject = "Document Approved - Approved";
                body = "document Approved";
                to = sendTo.ToString().Trim().TrimEnd(';');
                
                from = "ravish_v@some.com";
               
                SendMail(smtpAddress, subject, body, true, from, to);
            }
            else if (approvalStatus == "Rejected")
            {
                subject = "Document Rejected - Rejected";
                body = "document Rejected for approval";
                to = sendTo.ToString().Trim().TrimEnd(';');
                from = "ravish_v@some.com";
               
                SendMail(smtpAddress, subject, body, true, from, to);
            }

        }

Any help will be much appreciated.

 

Thanks 

Ravish

April 30th, 2015 12:03pm

Hi

Chk this url

http://infomoss.blogspot.in/search/label/Workflow2010

Free Windows Admin Tool Kit Click here and download it now
May 6th, 2015 1:53am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics