IF PAGE.RUNMODAL(0,TBCustomer) = ACTION::LookupOK THEN CDCustCode := TBCustomer."No.";this is pretty straightforward, in my opinon, but if i click the lookup button, and then esc (the lookupok does not take effect) the field is cleared...why? :-k and more important, how can i avoid it?
Answers
anyway, the topic is stil open, do you know how to avoid the problem?
"Never memorize what you can easily find in a book".....Or Mibuso
My Blog
"Never memorize what you can easily find in a book".....Or Mibuso
My Blog
I think ,the answer was in your reply ,the root cause is Onlookup ,the text variable is
PassByRef value so if you don't have to assigned any value ,the text will return blanks value.
This means that text is actually evaluated with the correct value when pressing "esc" instead of doing lookupok on the lookup page.
If i MESSAGE(text), nav returns the actual value of the textbox. if i message(cdcustomer) it returns, blank, no matter what
"Never memorize what you can easily find in a book".....Or Mibuso
My Blog
I think,your replies is everythings that I means as my previous posts (If you read by carefully ).
1) Work with the parameter passed as ref to "set the value"
2) Do not forget to exit(true) or exit(false) to signal if lookup was done or canceled... ;-)
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
"Never memorize what you can easily find in a book".....Or Mibuso
My Blog