How to call OriginalDocuments form by code D365fo

25 views Asked by At

Hi I am trying to call the OriginalDocuments form like the LedgerVoucherTrans calls it but from a different form (custom), I am trying it by calling the menuitem passing the GeneralJournalAccountEntry table as record argument but when I debug it I look than the method linkactive for the tmpledgerbase datasource didn't reach.

my clicked method for the button where I call it:

public void clicked()
{
generalJournalAccountEntry general;
MenuFunction    menuFunction;
Args args = new Args();

general = 
  generalJournalAccountEntry::find(PWFindWrongAnalyticalCodeValuesQuery.GeneralRecId);

args.record(general);
args.caller(this);

menuFunction = new MenuFunction(menuItemDisplayStr(Originaldocuments), MenuItemType::Display);
menuFunction.run(args);
}

Thanks in advance

0

There are 0 answers