dlgEvent__action__AfterSMS
Function called by relation event after sending a text message.
Syntax
PUBLIC FUNCTION dlgEvent__action_action_AfterSMS(
dlg ui.DIALOG, errNo INTEGER, errMsg STRING, sms SmsSettings_Type)
The action part of the function name is defined by the Action property of the relation (under Source UI Settings) . If the Action property is not set, an error will occur at compile time.
The function has four parameters:
dlg
. This is aui.DIALOG
object referencing the current dialog. The dialog can implement anINPUT
,INPUT ARRAY
,DISPLAY ARRAY
,MENU
, orCONSTRUCT
. For more information, see The Dialog class in Genero Business Development Language User Guide.errNo
. This is anSQLCA.SQLCODE
error.errMsg
. This is theSQLERRMESSAGE
message.sms
. This is the type of SMS sent.
Usage
When you select the After Sending SMS property for the creation of the event, a function shell is created. Enter your code in the function.
This function is called when an SMS is sent.
Example: After Sending SMS
This example uses the After Sending SMS code event on a relation. The Action property of the relation is set to sendMessage. Every time a user sends an SMS, a message is displayed.
PUBLIC FUNCTION dlgEvent__action_sendMessage_AfterSMS(dlg ui.DIALOG, errNo INTEGER, errMsg STRING, sms SmsSettings_Type)
IF errNo == ERROR_SUCCESS THEN
DISPLAY "SMS sent, type: " || sms
ELSE
DISPLAY "ERROR: [" || errNo || "] " || errMsg
END IF
END FUNCTION