Hello; Is it possible to paste text into a Navision dialogue box from another application? Here is what I am doing: WITH URLDialog DO BEGIN // Capture the URL CLEAR(UserURL); OPEN(‘URL #1##################################’, UserURL); INPUT; CLOSE; END; So far, nothing happens when I hit CNTRL-V. Many thanks, Brian.
No, this is not possible. You could explore it a little further, by right clicking your mouse in the field. You will see the cut, copy and paste functions, but when using them i guess you will crash Navision and get this error message:
Runtime Error!
Program: fin.exe
R6025
- pure virtual function call
Don’t know any workaround… Soren Nielsen, moderator Integration/Developer NOLUG
The INPUT statement is wrong in your code: You have to say which field should be imported and where the value should be placed. Thus:
INPUT(1,UserUrl);
Here another example which leads even further: You need the user enters some parameters but you don’t want to create a form for it: Let’s ask for three dates within our codeunit:
Var
window : Dialog;
BookingDate : Date;
DocumentDate : Date;
DeliveryDate : Date;
EntryNo : Integer;
NewEntryNo : Integer;
Window.open ('Booking Date #1#########\'+
'Dok. Date #2#########\'+
'Shipment Date #3#########',
BookingDate,DocumentDate,DeliveryDate);
EntryNo := 0;
NewEntryNo := 1;
While (NewEntryNo > 0) and
(EntryNo <> NewEntryNo) do begin
EntryNo := NewEntryNo;
Case EntryNo of
1 : NewEntryNo :=
Window.input(1,BookingDate);
2 : NewEntryNo :=
Window.input(2,DocimentDate);
3 : NewEntryNo :=
Window.input(3,DeliveryDate);
end;
end;
window.close;
if NewEntryNo = 0 then
Exit;
… continue code … Explanation: This routine allows the user to use the up/down- arrows and (Shift-)Tab to move between the fields. Function window.input returns the number of the next Entry Field if the user uses an arrow or tab. It returns 0 if the user presses ESC and the same fieldnumber if the user presses ENTER. ------- With best regards from Switzerland Marcus Fabian
Maybe … the code works just fine as Briana wrote it. But does this solve the copy/paste issue? I guess: NOT. Soren Nielsen, moderator Integration/Developer NOLUG