How to pass LedgerJournalTrans table in resolve method of InvoiceJournalExpPartcicipantProvider class?

369 Views Asked by At

I have literally tried everything but still in vain. This here is InvoiceJournalExpParticipantProvider class that is supposed to provide me partici[ant names inside the workflow (all of this is custom code). Now what i want is to pass the LedgerJounalTrans table instead of the VendInvoiceInfoTable or VendInvoiceInfoLine table. I cannot seem to find a way to do this. I tried using the following code

else if (_context.parmTableId() == tableNum(LedgerJournalTrans)) { ledgerJournalTrans = LedgerJournalTrans::findRecId(_context.parmRecId(),false); }

But it constantly gives me an error either telling me that the operand types are of not the same types or the number of arguments passed are invalid although when i go and check the findRecId() method of ledgerJournalTrans table there are only two params being passed.

public WorkflowUserList resolve(WorkflowContext _Context, WorkflowParticipantToken _participantTokenName)
    {
        WorkflowUserList     userList = WorkflowUserList::construct();
        VendInvoiceInfoTable                        vendInvoiceInfoTable;
        VendInvoiceInfoLine                         vendInvoiceInfoLine;
        VendInvoiceInfoLine_Project                 vendInvoiceInfoLine_Project;
        WorkflowParticipantExpenToken               workflowParticipantExpenToken;
        WorkflowParticipantExpenTokenLine           workflowParticipantExpenTokenLine;
        RefRecId                                    dimensionAttributeSetRecId;
        MarkupTrans                                 markupTrans;
        CompanyInfo                                 legalEntity;
        ProjTable                                   projTable;
        HcmWorker                                   worker;
        DirPersonUser                               personUser;
        HcmPositionDetail                           hcmPositionDetail;
        HcmPosition                                 hcmPosition;
        HcmPositionWorkerAssignment                 hcmPositionWorkerAssignment;
        LedgerJournalTrans                          ledgerJournalTrans;
    
        // check participant token name is given otherwise throw error
        if(!_participantTokenName)
        {
            throw error('Participant name');
        }
    
        userList.add('Admin');
    
        if (!_participantTokenName)
        {
            throw error("@SYS105453");
        }
    
        workflowParticipantExpenToken = WorkflowParticipantExpenToken::findName(
            this.documentType(),
            _participantTokenName);
    
        if (!workflowParticipantExpenToken)
        {
            throw error(strFmt("@SYS313865", _participantTokenName));
        }
    
    
        if (_context.parmTableId() == tableNum(VendInvoiceInfoTable))
        {
            vendInvoiceInfoTable = VendInvoiceInfoTable::findRecId(_context.parmRecId());
        }
        else if (_context.parmTableId() == tableNum(VendInvoiceInfoLine))
        {
            vendInvoiceInfoTable = VendInvoiceInfoLine::findRecId(_context.parmRecId()).vendInvoiceInfoTable();
        }
0

There are 0 best solutions below