Monday, March 30, 2015

Dexterity Template - Entry window Open()


Open()
{
Called by RecordID Zoom and Record Lookup Open button
}
in RecordID RecordID;

if isopen(window RecordWindow of form RecordWindow) then
open window RecordWindow of form RecordWindow;
else
open form RecordWindow;
end if;

if not empty(RecordID) then
if changed(window RecordWindow of form RecordWindow) then
run script 'Handle Changes'of window RecordWindow of form RecordWindow;
if 'Handle Changes' of window RecordWindow of form RecordWindow then
run script 'Clear Button' of window RecordWindow of form RecordWindow;
'Temp Record ID' of window RecordWindow of form RecordWindow = RecordID;
run script 'Temp Record ID' of window RecordWindow of form RecordWindow;
focus RecordID of window RecordWindow of form RecordWindow;
end if;
else
run script 'Clear Button' of window RecordWindow of form RecordWindow;
'Temp Record ID' of window RecordWindow of form RecordWindow = RecordID;
run script 'Temp Record ID' of window RecordWindow of form RecordWindow;
focus RecordID of window RecordWindow of form RecordWindow;
end if;
end if;

Open Button on Lookup
if empty(RecordID of window RecordLookupWindow) then
warning getmsg(2154); {Please select a record first;}
    focus 'Open Button';
abort script;
end if;

call Open of form RecordForm, RecordID of window RecordLookupWindow;

No comments:

Post a Comment

There was an error in this gadget