Correspondence formula

When correspondence output is a standard part of a process, Infor Public Sector typically includes a field that you can use to specify the correspondence process setup to use. For example, you can use Bill Type Setup to associate a correspondence process with a bill type, or you can use Service Request Types in CRM to indicate which correspondence setup to use for automated emails relating to service requests.

Even when there isn’t a Correspondence Setup field available, you can use the Formula Editor to set up correspondence output for a wide variety of records in Infor Public Sector. For example, this formula uses the ScheduleEmailCorrespondence method to send an email to the vendor specified for a purchase order in the Inventory module.

Dim res as result
Dim CorrProcessSetupName as String = “PurchaseOrder”
Dim EntityKey as Integer = oPurchaseOrder.PurchaseOrderKey
Dim MonikerName as String = oPurchaseOrder.MonikerName
Dim Email as String = oPurchaseOrder.VendorContact.EMailAddress
res = Hansen.Core.Correspondence.CorrespondenceUtility.ScheduleEmailCorrespondence (CorrProcessSetupName, EntityKey, MonikerName, Email)
return res

If you add this formula to the PurchaseOrder object’s AfterAdd event handler in the Workflow Manager, Infor Public Sector will use the specified correspondence process setup to send an email to the vendor contact’s email address when a new purchase order is created. Note that the purchase order is only used as an example here, so you could adapt this formula for other types of records by changing the values of the variables. All that is required is a correspondence process setup and an email address.