Pular para o conteúdo principal

CallAddEdit

Structure

CallAddEdit(sAddEditType, sCompany, sHeader, sKey: Text)

Type

Procedure

Description

This procedure allows the user to call an Add/Edit wizard directly from the event screen.

Parameters: 4

sAddEditType = the type of add/edit to be called. These names correspond exactly to the table name in the database - see Data Dictionary for more details.

sCompany = the name of the company that should be selected upon entry (if applicable)

sHeader = the name of the header value (if applicable). A header value is a secondary key for the grid items - for example, the Model Numbers add/edit list. This list is keyed by Company name and also Manufacturer. So, above the Model Number grid there are 2 drop downs, one for Company and the next for Manufacturer. This sHeader value would correspond to the Manufacturer value to select upon entry.

sKey = the value in the add/edit grid to automatically select for edit. This value can be blank, but if so you will be launched to the main 'grid' screen for the add/edit - rather than launched immediately into the wizard to edit the record.

Example

' this example would be appropriate for the 'Attribute Button Click' trigger action, in an event with an EMPLOYEE ONSITE event attribute

' that is setup as a button. When pressed, the EMPLOYEE ONSITE event attribute value is selected and shown in add/edit for 'ABC COMPANY'

if LookupButtonName = 'EDIT EMPLOYEE ONSITE' then

CallAddEdit('EMPLOYEE', 'ABC COMPANY', '', LookupEventAttributeText('EMPLOYEE ONSITE'))

End If |