Announcements
No record found.
[ExtensionOf(classStr(InventJournalTemplateDocument))] final class InventJournalTemplateDocument_TSIM_Extension { public DMFNoYesStr getInventAdjustQty(CompanyId _companyId, TableId _tableId, RecId _recId) { InventJournalTable inventJournalTable; InventJournalTrans inventJournalTrans; DMFNoYesStr autoApprove = 'Yes'; inventJournalTable = inventJournalTable::findByRecId(_recId); select firstonly inventJournalTrans where inventJournalTrans.RecId == inventJournalTable.RecId && inventJournalTrans.Qty <= 0; if(inventJournalTrans) { autoApprove = 'No'; } return autoApprove; } }
Thanks,
Waed Ayyad
If this helped, please mark it as "Verified" for others facing the same issue
I think the method must return a supported data type (str, int, enum, etc.) Most importantly — the method must be decorated with attributes so the workflow runtime can detect it.
str
int
enum
Thanks, Ramesh
If this was helpful, please check the "Does this answer your question?" box and mark it as verified.
Hi,
Is your issue resolved? If yes, mark the answers that helped you as verified.
public class MyApprovalWorkflowDocument extends WorkflowDocument { public MyEnum parmHasCreditLine(CompanyId _companyId, TableId _tableId, RecId _recId) { SalesTable salesTable; MyEnum hasCreditLine; //custom base enum with label changeCompany(_companyId) { salesTable = SalesTable::findRecId(_recId); if (salesTable) { hasCreditLine = salesTable.type().myHasCreditLine() ? MyEnum::Yes : MyEnum::No; } } return hasCreditLine; } }
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
Congratulations to our 2026 Super Stars!
We are thrilled to have these Champions in our Community!
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Giorgio Bonacorsi 669
André Arnaud de Cal... 445 Super User 2026 Season 1
Syed Haris Shah 331 Super User 2026 Season 1