By default the standard 'Purchase Order Custom Email' plugin inserts the reference from the Purchase Order Reference field into the Subject line of the email and the message body defined in the Plugin itself.
To automatically insert a customized Subject line and Message Body into a purchase order the copied and renamed plugin needs to be changed as follows:
1. Copy the 'Purchase Order Custom Email' plugin and give it a new name
2. Change the Author with the company name or developer name
3. Make sure the Jiwa version is correct in the Version field
4. In the plugin code scroll down until you see this code: (Line 46 to 49)
- Code: Select all
Dim lSubject As String = "This is the subject"
Dim lStaffFname As String = ""
Dim lStaffSName As String = ""
Dim lMessage As String = "This is the email message"
5. Enter the customized subject line between the double quotes for
- Code: Select all
Dim lSubject As String = "This is the subject"
6. Enter the customized Message Body into the double quotes for:
- Code: Select all
Dim lMessage As String = "This is the email message"
7. Scroll down until you see this code: (Lines 65 to 68)
- Code: Select all
lNameToGiveAttachment = PurchaseOrderForm.PurchaseOrder.OrderNo
lEmailTo = PurchaseOrderForm.PurchaseOrder.Creditor.EmailAddress
lSubject = PurchaseOrderForm.PurchaseOrder.Reference
8. Replace the above code with this code
- Code: Select all
lNameToGiveAttachment = PurchaseOrderForm.PurchaseOrder.OrderNo
lEmailTo = PurchaseOrderForm.PurchaseOrder.Creditor.EmailAddress
If PurchaseOrderForm.PurchaseOrder.Reference.Trim.Length > 0 Then
lSubject = PurchaseOrderForm.PurchaseOrder.Reference
End If
9. Click the 'Compile' button in the Plugin Code Toolbar and save
10. Close and re-open Jiwa