George Chalkiadakis

I have managed to customize state approval to be able to receive an expense report and manage the approver and reviews. I have developed a expense report post it to a form library. The custom workflow is taking from the form library the manager and supervisor ids and is routing the expense report form reviewing and approval.

private void OnWorkflowActivated(object sender, ExternalDataEventArgs e)
{
this.taskName = "ApprovalWF";
this.submittedBy = this.workflowProperties.Originator;
this.instruction = "";

try
{
SPList yourList = workflowProperties.List;

SPListItem item = yourList.GetItemById(workflowProperties.ItemId);

this.ReviewerName = item["Supervisor Domain Name"].ToString();
this.FinalApproverName = item["Manager 2 Domain Name"].ToString();

}
catch(Exception ex)
{

this.ReviewerName ="";
this.FinalApproverName ="";

}


}

The problem i have is that i wish to customize email send during the approval and reviewing without developing custom activity. Can anyone help me .



Re: SharePoint - Workflow Customing State Approval to develop expense report approval schema

Paul Galvin

You can make some kinds of changes by modifying alerttemplates.xml

I'm not sure if that's what you really want, but check it out here: http://www.combined-knowledge.com/Downloads%202007.htm

Check out the white paper on modifying email alert templates.






Re: SharePoint - Workflow Customing State Approval to develop expense report approval schema

GeorgeChalkiadakis

Dear Paul,

Thank you very much for the information you have posted. My concern has to do with the email that workflow tasks are sending. I have read in the msdn about

myTaskProperties.HasCustomEmailBody = true;

myTaskProperties.EmailBody = "";

but my question is about the email body and if there is somewhere I can find the default email body. I really want to make some small modification inside the default email and keep all the editing functionality and the rest of the functionalities that the default email already includes.

Thank you very much

George.





Re: SharePoint - Workflow Customing State Approval to develop expense report approval schema

Farrah123

Did you figure this out I am looking for the samething.





Re: SharePoint - Workflow Customing State Approval to develop expense report approval schema

GeorgeChalkiadakis

You can send an email by

workflowTask1Properties.SendEmailNotification = true;

workflowTask1Properties.EmailBody = "<HTML>\n <HEAD>\n <STYLE>\nTABLE.mail\n{\n border-collapse:collapse; width:100%;\n font: 8pt Tahoma;\n}\n\nTD.header { background[:#]F8F8F9; order:1px solid #E8EAEC; padding: 12pt 10px 20px 10px; font: 16pt Verdana}\nTD.body { border-top:1px solid #E8EAEC; border-bottom:1px solid E8EAEC; padding: 12pt 10px 24pt 10px; }\nTD.footer { border-top:1px solid #E8EAEC; border-bottom:1px solid #9CA3AD; padding: 4pt 10px 4pt 10px; }\nA { olor[:#]003399; text-decoration:none; }\nA:visited { color[:#]aa00aa; }.bodytext\n{\n font: 8pt Tahoma;\n color: #000000;\n}\n\n </STYLE>\n </HEAD>\n <BODY class=bodytext>\n <TABLE class=mail cellspacing=0 dir=ltr>\n <TR class=header>\n <TD class=header>" + this.Originatorname.ToString() + " has submitted a new Expense request for review and approval.<br><div style=\"font: 8pt Tahoma\">View the <a href=\"http://spsupgrade/_layouts/Versions.aspx List=dedb7445%2D2bc1%2D4515%2Dbff8%2Dbdce29f8ab64&ID=" + this.CurrenttaskId.ToString() + "\">version history</a> for this ask.</div></TD>\n </TR>\n <TR class=body>\n <TD class=body></TD>\n </TR>\n <TR class=footer><TD class=footer>To complete this task:<br><ol><li>Please review the url to the ER file <A href=\"" + _DocList + System.Web.HttpUtility.UrlEncode(workflowProperties.Item.File.Name.ToString()) + "&"+_AllItems+"\"> " + workflowProperties.Item.File.Name.ToString() + "</A> Exepense Report.</li><li>Perform the specific activities required for this task.</li><li><!--[if gte mso 12]>To approve or reject it, use the <b>Edit this task</b> button at the top of this window or click <A href=\""+_TaskList + this.CurrenttaskId.ToString() + "\">here</A>. <a ref=\""+_TaskList + this.CurrenttaskId.ToString() + "\">here</a> to request access.)<![endif]--><![if !(gte mso 12)]><a ref=\""+_TaskList+ this.CurrenttaskId.ToString() + "\">Edit this task</a> to mark the task as completed.<![endif]></li></ol></TD></TR>\n\n </TABLE>\n \n </BODY>\n</HTML>";
workflowTask1Properties.HasCustomEmailBody = true;