Monday, August 28, 2017

Get voucher Transactions Original documents

Originaldocuments           originaldocuments;
    TmpLedgerBase               tmpLedgerBase;
    Common                      common;
    GeneralJournalAccountEntry  accountEntry;
    LedgerTransModule           ledgerTransModule;
    ;
    accountEntry = GeneralJournalAccountEntry::find(this.RecId,false);
    common = accountEntry;
    //Consider first - original documents
    originaldocuments   = new Originaldocuments(common);
    originaldocuments.findRelations();
    tmpLedgerBase.setTmpData(originaldocuments.relations());
   
    if(!tmpLedgerBase)//if it Original Document is not There means  - then as per requested considering Transaction Origin
    {
        ledgerTransModule=new LedgerTransModule();
        ledgerTransModule.createTransModule(accountEntry.RecId);
        tmpLedgerBase.setTmpData(ledgerTransModule.transModule());
    }
    return tmpLedgerBase;

No comments:

Post a Comment

Disabling the flight in D365FO (CHD - Tier 1)

 INSERT INTO dbo.SYSFLIGHTING(FLIGHTNAME, ENABLED)  VALUES ('<FlightObjectName>_KillSwitch', 1)  or  INSERT INTO dbo.SYSFLIGHT...