Here is an example of
a great customization:
By
Editor’s note: the customizations module must be registered
at your site in order to follow these instructions. Check under utilities, registration, to see
is this module is owned by your company.
The customization module is a must have module to unleash to flexibility
of your
One of the simplest and most useful customizations is to make a convenient button to allow for printing a report straight from an entry screen. To illustrate this technique, we will use the AR Invoice and Memo screen and create a button that prints the invoice or memo shown on the screen on the Invoice/Memo Forms.
Note: It is preferable to do your customization work in a test database and then copy it into production. If you make a mistake while customizing a screen it can become unusable until that customization is removed.
Log into

You can also
change the caption

The next step is to add event code logic on the print button so this event (i.e. printing a copy of the invoice) occurs when the button is selected. This can be accomplished as click on the new button, then right click and select properties Start the Visual Basic Editor and put this code in a new routine (Note: try a copy and paste to the Visual Basic editor)
Dim
CmdLine$ 'Create
a variable to save the command we will use to access the report.
Dim
CustId$, RefNbr$, DocType$ 'Create some other variables to store record information.
CustId = GetObjectValue("ccustid")
RefNbr =
GetObjectValue("crefnbr")
DocType =
GetObjectValue("cdoctype")
If
Len(Trim(RefNbr)) > 0 Then 'Only call the report if there is an invoice number.
CmdLine = "ROI.EXE
" '
CmdLine = CmdLine + PRMSEP +
"08760/
CmdLine = CmdLine + PRMSEP +
"08760/FORMAT" 'Add in the format we want to use.
'The
next four lines create the selection criteria.
CmdLine = CmdLine + PRMSEP +
"ARDoc.CustId =" + SParm(CustId) + "And "
CmdLine = CmdLine +
"ARDoc.RefNbr =" + SParm(RefNbr) + "And "
CmdLine = CmdLine +
"ARDoc.DocType =" + SParm(DocType)
CmdLine = CmdLine +
"/WHERE"
CmdLine = CmdLine + PRMSEP +
"/PSCRN" 'Print the report to screen.
serr1 = Launch(CmdLine, True, True, 0) 'Call the report engine and run a report.
End If
End Sub
Note: verify after pasting that you only have one
line at the top for
The visual basic editor should look like:

Save the customization and leave customization mode. Your Invoice and Memo screen should have a Print Invoice/Memo button and when you press it the invoice report will be run.
This allows a user to quickly

Invoice and Memo screen with the new Print Invoice/Memo button.

Invoice report ready to be printed on a form.