Database Reference
In-Depth Information
Figure 11-10. The “+” button opens the Edit Script window. The “-” button deletes the selected
script, but click it with extreme caution—you can't retrieve a deleted script. The pop-up menu
(shown here) lets you create a Default Script that has basic script steps already created for you.
It's a three-step script that enters Browse mode, goes to the layout you're on when you choose the
Default Script command and then shows all records. The Edit command lets you edit the selected
script, and Duplicate creates a copy of an existing script so you can use it as the foundation for a
new script.
TIP
Anywhere the Specify Script window appears you'll get these same shortcut buttons. Look for them
in the File→File Options window, the Layout Setup's Script Trigger tab, and the Edit Custom
Menu's Action Option window.
The Importance of the Layout
In a script, the active layout is very important, since it determines the script's context . Con-
text is critical when you do things like delete records. If you write a script that simply deletes
a record, without checking for context, then it deletes the current record from whatever lay-
out someone happens to be on. That record may not be the right one at all. You could end up
deleting a record from the Customer table instead of the single invoice record you meant to
delete!
Search WWH ::




Custom Search