You can create an automation script that can notify users of receipts in an email, without sending a separate email for each receipt record. This process uses an escalation to activate a custom action to do send the notification.
This automation script was developed on Maximo Asset Management version 7.5.0.10 and SQL Server.
This automation script works only for purhcase orders where all lines are requested by the same user.
Create a persistent attribute that is named PO.LASTRECDATE (DATETIME 10).
- Optionally, add the attribute to the List and Main tabs for purchase orders.
- Turn off Admin mode.
Create a role that is named POREQ and specify the following information for the role:
- Type: Data Related to the Record
- Object: PO
- Value: :poline.requestedby
Create a communication template that is named PORECEIPT and specify the following information for the template:
- Applies To: PO
- Subject and Message are customizable for your business needs.
- Add the POREQ role as a recipient.
- Activate the template.
Create a custom launch point that is named PORECCOMM and specify the following information:
- Object: PO
- Action: PORECCOMM
- Bound Variables: None
- Source: See the poreccomm.py script. It is also available at this link.
Create an action group that is named PORECESC and specify the following information.
- Object: PO
- Type: Action Group
- Members: PORECCOMM
You can create new views on the database that are independent of Maximo Asset Management.
- The following sample code can be used to update all PO records:
V_PORECEIPTS- The following sample code can also be used to update the V_MX_PORECEIPTS view:
V_MX_PORECEIPTS (extra credit)- The following sample code can be used as an imported Maximo object that combines MATREC and SERVREC by PO:
Create an escalation that is named PORECESC and specify the following information.
- Applies To: PO
- Condition:
po.historyflag = 0 AND po.receipts <> 'NONE'
AND (exists (SELECT 1 FROM matrectrans mr WHERE mr.ponum = po.ponum AND mr.receiptref is NULL AND mr.issuetype = 'RECEIPT' AND mr.transdate > isnull(po.ns_lastrecdate,po.orderdate))
OR exists (SELECT 1 FROM servrectrans sr WHERE sr.ponum = po.ponum AND sr.receiptref is NULL AND sr.issuetype = 'RECEIPT' AND sr.transdate > isnull(po.ns_lastrecdate,po.orderdate)))
• Escalation Point: repeats • Action Group: PORECESC • Don’t forget to activate this SQL code.
The following code contains the entire sample script for this scenario. PORECCOMM Script