Run Form Modal

geri79geri79 Member Posts: 105
What is wrong in here?

I am starting from the Job card, so my Rec=Record from Job table
rJobBudgetLine is a global: Record "Job Budget Line"

rJobBudgetLine.SETRANGE("Job No.",Rec."No.");
FORM.RUNMODAL(FORM::"Job Budget",rJobBudgetLine);

It always opens the job budged of the first record in the job table.
geri

Comments

  • Revolution1210Revolution1210 Member Posts: 161
    The reason this doesn't work is because of the code which sits in the OnOpenForm() trigger of form 21 Job Budget.

    If you launch the form using properties instead, it should be ok.

    e.g.,

    PushAction = RunObject
    RunObject = Form Job Budget
    RunFormLink = Job No.=FIELD(No.)
    Ian

    www.NextEqualZero.com
    A technical eye on Dynamics NAV
  • geri79geri79 Member Posts: 105
    Is there any other possibility? I need to run some code afterwards

    rJobBudgetLine.SETRANGE("Job No.",Rec."No.");
    FORM.RUNMODAL(FORM::"Job Budget",rJobBudgetLine);
    CurrFrom.Update;

    ---
    CurrForm is the Job Card from where I started...
    geri
  • geri79geri79 Member Posts: 105
Sign In or Register to comment.