Trying to openEdit a General Journal TestPage

josalm
josalm Member Posts: 7
edited 2021-03-24 in NAV Three Tier
Hi,
I'm trying to test the Post Action in TestPage General Journal, but when i use the OpenEdit() it always returns an error saying that i can't open the page. If i don't put this option the returned error is "This Page is not open".

Here is my code
var
LibJournal: Codeunit "Library - Journals";
GenJournal: TestPage "General Journal";


LibJournal.CreateGenJournalLineWithBatch(GenjournalLine, DocumentType::" ", AccountType::Vendor, Vendor."No.", 0);
GenJournal.OpenEdit();
GenJournal.GoToRecord(GenjournalLine);
GenJournal.Post.Invoke();

I've tried different libraries, creating batches and templates separately, but nothing seems to work.
Any ideas?
Thanks in advance

Answers

  • kriki
    kriki Member, Moderator Posts: 9,121
    [Topic moved from 'General Chat' forum to 'NAV Three Tier' forum]

    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!