Adding a formula task in the Batch Manager
Next we’ll add a task in the Batch Manager to create the report output.
- Select System > Batch Processing > Batch Manager.
- Click Action and select Add a New Task.
- Enter a name for the task in the Task Name field.
- Select Formula from the Available Tasks list.
-
To add the formula, click the popup button to the right of the Formula field and then click Add above the grid. Enter this code in the
Formula Editor:
Dim res as Result Dim CorrProcessSetupName as String = "CDR Building App 90d Report" Dim EntityKey as Integer = 0 Dim MonikerName as String = "Hansen.CDR.Building.BuildingApplication" Dim Email as String = "valid.email@infor.com;valid.email2@infor.com" Dim Subject as String = "CDR Building Application 90 Days Report" res = Hansen.Core.Correspondence.CorrespondenceUtility.ScheduleEmailCorrespondence (CorrProcessSetupName, EntityKey, MonikerName, Email, Subject) return res
The
CorrProcessSetupName
is required, and must match the name of the correspondence process setup that you created previously.The
MonikerName
is also required. Enter the same moniker you used for the Business Object Component when you created you general report.For the
Email
variable, enter at least one valid email address. You can enter multiple email addresses separated by semicolons.Finally, the
Subject
variable will be used as the subject line of the email that Infor Public Sector sends when the formula is triggered. Infor Public Sector will send an email, with the report as an attachment, to each recipient you specified in the formula. - Click Save.