See how page Account Schedule (104) works with G/L Account List (18) (Getselectedfilter function). I suggest to remove subpage and use only a page Like 104
hi,
i am a trainee Nav Devoloper and i need your help.
i do have to use the same function to use the logic of copy/past to copy lines from an existing Program Order to a new created one.
in this case :
I created the function on the Page Program order Card.
i created a Report because when i click on the function in the page i want to see a field “program No.” which i created in the request page from the report to be able to give an existing Program order No or to select one from the program order list.
I created a codeunit for my code and i want to call it from the function trigger in the page program order card.
i have the code but i dont know if its correct.
------CODEUNIT : i created a function calls “CopyProgramLineNew” :------------------------------------
ProgOrderLine.RESET;
ProgOrderLine.SETRANGE(“Program No.”, ProgOrderLineP.“No.”);
IF ProgOrderLine.FINDSET THEN REPEAT
ProgOrderLineP.INIT;
ToProgOrderLine := FromProgOrderLine;
ProgOrderLineP.TRANSFERFIELDS(ProgOrderLine);
ProgOrderLineP.“Program No.” := SalesProgramHeader.“No.”;
ProgOrderLineP.VALIDATE(Type, ProgOrderLine.Type);
ProgOrderLineP.VALIDATE(“No.”, ProgOrderLine.“Program No.”);
IF ProgOrderLineP.INSERT(TRUE) THEN ;
UNTIL ProgOrderLine.NEXT = 0;
EXIT(TRUE);
------REPORT : On the LOOKUP of the “Program No.” field i put : -----------------------------------------------------------
FromSalesProgramHeader.RESET;
FromSalesProgramHeader.SETRANGE(“No.”,ToSalesProgramHeader.“No.”);
IF FromSalesProgramHeader.FINDSET THEN BEGIN
IF PAGE.RUNMODAL(50452,ToSalesProgramHeader) = ACTION::LookupOK THEN
CopyOrderProgramLines := ToSalesProgramHeader.“No.”;
END;
please help, i cant fix it.
thank you and best reagards.