Just recorded how to extend the feature regards the CustTrans and VendTrans.
Bring the customized fields of LedgerJournalTrans to CustTrans or VendTrans
If the requirement wants to create the new fields on CustTrans/VendTrans and LedgerJournalTrans, and want to sync the customized fields to Transaction record after posting the customer journal or vendor journal. You can extend the CustVoucherJournal/VendVoucherJournal as follows:
///<summary> /// Willie Yao - 07/08/2025 ///</summary> [ExtensionOf(classstr(LedgerJournalCheckPost))] final classHMClass_LedgerJournalCheckPost_Extension { ///<summary> /// Willie Yao - 07/08/2025 ///</summary> ///<param name = "_calledFrom">CalledFrom</param> ///<returns>True if validate right</returns> public boolean validate(Object _calledFrom) { boolean ret = next validate(_calledFrom);
ret = this.newValidation() && ret;
return ret; }
///<summary> /// Willie Yao - 07/08/2025 ///</summary> ///<returns>True if validate right</returns> internal boolean newValidation() { LedgerJournalTrans ledgerJournalTrans; boolean ok = true;
ok = this.newValidationLogic(ledgerJournalTrans) && ok;
return ok; } }
Extend CustTrans/VendTrans Reversal Logic
Developers must coc the reversal method and write the customized logic after the next invoke method.