Yes, it is possible to uniquely identify a voucher, similar to a master.
1. If the Object Voucher needs to be identified in a Report or a Function to set the current object context, then only the MasterID of the current Voucher can be used. MasterID must be used prefixed with ID:
[Report: TSPL Sample Voucher Object]
Object : Voucher : @@TSPLVchID
[System: Formula]
TSPLVchID : "ID:27"
2. If the Object Voucher needs to be identified in the Action Modify Object, any methods can be used.
a. If MasterID is used as an identifier, Date is not required and uniqueness of the Voucher is ensured.
b. If any other identifier is specified, specifying Date becomes mandatory and first Voucher matching the given Method Value for the specified day will be taken up for alteration.
[Function: Modify PO Narration]
VARIABLE : VarNarr : String
00 : SET : VarNarr : "This is modified Narration"
10 : MODIFY OBJECT : (Voucher,@@VID).Narration : ##VarNarr
[System: Formula]
VID : Date:"1-Apr-2008":Reference:"abcd"
Similar to the Method Reference used above, any of the other Methods can be used as shown below:
VID: "Date:'" + $$String:$Date + "'" + ":Reference:'" + $PurchaseOrderNo + "'"
VID: "Date:'" + $$String:$Date + "'" + ":Narration:'keshava madhava'"
VID: "Date:'" + $$String:$Date + "'" + ":Narration:'" + $$Table:EIOrder:$Narration.