Init Value doesn't works

Martin_FörsterMartin_Förster Member Posts: 55
Hallo

my Problem is then i open Form A and from this Form want to open Form B, i init some Values from Form A to Form B.

2 of them works fine, but the Value 3 doesn't work. Has anybody an solution??

Here the Codes:

On the Lookup Trigger from Field XYZ on Form A:
Vermietungsliste.initwohnung(TRUE);
Vermietungsliste.initPrice("Budget (CHF)");
Vermietungsliste.initstartdate(Einzugsdatum);
COMMIT;
Vermietungsliste.LOOKUPMODE(TRUE);
IF Vermietungsliste.RUNMODAL = ACTION::LookupOK THEN BEGIN
  Vermietungsliste.GETRECORD(G_vermietung);
  VALIDATE("Mietobjekt 1 Code",G_vermietung.Mietobjektcode);
END;
CLEAR(Vermietungsliste);


The init Code of Form B:
IF _wohnung = TRUE THEN BEGIN
 Freieobjekte:= Freieobjekte::Wohnungen;
calcperioddates;
calcpreis;
SETRANGE(Wohnung,TRUE);
END;

Comments

  • ara3nara3n Member Posts: 9,256
    I haven't run into this issue yet. I'm curios why you don't have one function with 3 parameter.
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
  • AsallaiAsallai Member Posts: 141
    Did you tried this other form calling?
    IF FORM.RUNMODAL([YourFormNo],G_vermietung) = ACTION::LookupOK THEN BEGIN
     ...
    END;
    
  • Martin_FörsterMartin_Förster Member Posts: 55
    Yes, your are right... i did it now. But in front of the Functions were create to different times and from different users.

    BUt it doesn't work :-(
  • matttraxmatttrax Member Posts: 2,309
    I believe you need to set the record that the second form should open with.

    Why not do something like this?
    Record.Field1 := value1;
    Record.Field2 := value2;
    Record.Field3 := value3;
    
    MyForm.SETRECORD(Record);
    MyForm.LOOKUPMODE := TRUE;
    IF MyForm.RUNMODAL = Action::LookupOK THEN BEGIN
    //...
    END;
    

    Hope I didn't miss the point of your question. Good luck.
Sign In or Register to comment.