Mail in work flow process

Hi All,

I have set the workflow for Purchase invoice approval and for vendor payment in AX 2012.

Now when one user submit the workflow to next user for approval then mail required to be sent from system that there is a pending task of approval.

Kindly guide which set up is required to be done in AX 2012 to shoot a mail.

Thanks,

Jainal Shah

Notifications may be sent to you when workflow-related events occur. For example, a notification may be sent to you when a document is assigned to you for approval or when the workflow process is completed for a document that you submitted. You can specify how you want to receive workflow notifications.

  1. Click File > Tools > Options.

  2. In the left pane of the Options form, click Notifications.

  3. In the Receive notifications every (minutes) field, enter the number of minutes to specify how often you want to receive notifications.

  4. In the Line-item notification type list, specify how you want to receive workflow notifications for line items from the following options:

    • Grouped – Notifications for line items are grouped into a single notification.

    • Individual – A notification is sent for each line item.

  5. To receive notifications in the Microsoft Dynamics AX client, select the Show notifications in the Microsoft Dynamics AX client check box.

    If you select the Show notifications in the Microsoft Dynamics AX client check box, you can also specify whether you want to receive notifications as pop-up messages. To receive pop-up messages, select the Show pop-ups for notifications check box.

  6. To receive notifications as email, select the Send notifications in email check box.

this is the code for sending a mail… i guess there is no setting for this issue…

static void c_SendQuickMail(Args _args)

{

//str ToAddress = “chaitanya.k@dhanushinfotech.net”;

str FromAddress = “chaitanya.k@dhanushinfotech.net”;

str Subject = “New2”;

str Body = “Hi”;

str FileToAttach = “D:\fn.pdf”;

SysMailer mailer = new SysMailer();

;

mailer.ccs().appendAddress(“chaitanya.k@dhanushinfotech.net;ramakrishna.k@dhanushinfotech.com”);

mailer.quickSend(fromaddress,"chaitanya.k@dhanushinfotech.net",subject,body,"",FileToAttach);

}

just write this code in workflow tracking table insert method as…

public void insert()
{
UserId useridcheck;
;
super();

if(this.TrackingContext == WorkflowTrackingContext::WorkItem
&& this.TrackingType == WorkflowTrackingType::Creation)
{

}
}