Action OK Problem

Martin_FörsterMartin_Förster Member Posts: 55
Hallo,

What can be the Problem for this Situation:

I open a Form via Lookup Prperty, i search one of Records an Push ENTER (on Keyboard) an know the Courser going right!?!?

I think the Action should be to transfer the Field Value in the Form from where i Start!?!? Isn't it??


THX for Help

Comments

  • Timo_LässerTimo_Lässer Member Posts: 481
    Hallo,

    What can be the Problem for this Situation:

    I open a Form via Lookup Prperty, i search one of Records an Push ENTER (on Keyboard) an know the Courser going right!?!?

    I think the Action should be to transfer the Field Value in the Form from where i Start!?!? Isn't it??


    THX for Help

    Check the property "Default" of the OK button. It should be set to "Yes".
    Timo Lässer
    Microsoft Dynamics NAV Developer since 1997
    MSDynamics.de - German Microsoft Dynamics Community - member of [clip]
  • MalajloMalajlo Member Posts: 294
    Check if you have any code on OnOpenForm or something that changes LookupMode (see C/SIDE help).
  • Martin_FörsterMartin_Förster Member Posts: 55
    I do it on this way...

    On the Form at the Field Trigger.. i write in the "on lookup" Trigger this
    Vermietungsliste.initPrice("Budget (CHF)");
    Vermietungsliste.initstartdate(Einzugsdatum);
    Vermietungsliste.LOOKUPMODE(TRUE);
    Vermietungsliste.RUN;
    

    so the List start an i have the OK Button ther with the seeting Default = yes

    pushaktion = onlookupok


    Had i write some codes on the ON Push Trigger by the OK-Button?? I think not..
  • jlandeenjlandeen Member Posts: 524
    Ok I think a little has been lost in translating your question into English. But from what I can see it sounds like you're having problems getting the value from a look uplist that a users selects from, out and into a field from a calling form or table, etc.

    Here's a suggestiong for some code changes:
    Vermietungsliste.initPrice("Budget (CHF)"); 
    Vermietungsliste.initstartdate(Einzugsdatum); 
    Vermietungsliste.LOOKUPMODE(TRUE); 
    if Vermietungsliste.runmodal = action::lookupok then begin
      recordvar := Vermietungsliste.getrecord;
      fieldname := recordvar.SomeField;
    end;
    
    Jeff Landeen - Sr. Consultant
    Epimatic Corp.

    http://www.epimatic.com
  • Martin_FörsterMartin_Förster Member Posts: 55
    Thx a lot...

    it works fine if i modify your example like this..

    :-)


    Vermietungsliste.initPrice("Budget (CHF)");
    Vermietungsliste.initstartdate(Einzugsdatum);
    Vermietungsliste.LOOKUPMODE(TRUE);
    if Vermietungsliste.runmodal = action::lookupok then begin
      Vermietungsliste.getrecord(recordvar);
      fieldname := recordvar.SomeField;
    end;
    
  • jlandeenjlandeen Member Posts: 524
    Yeah that looks about right. I was typing my code from memory...and remembering exact syntax is always a bit tricky - but you got the idea and I'm glad to hear that worked.
    Jeff Landeen - Sr. Consultant
    Epimatic Corp.

    http://www.epimatic.com
Sign In or Register to comment.