Source | Event | Parm | Example |
Class | Pre/Post event | XppPrePostArgs | Get args and parmameter values from a method that is being extended. Parm 1 = Object Parm 2 = Common PurchCreateFromSalesOrder callingClass = args.getThis() as PurchCreateFromSalesOrder; Object callerObject = args.getArgNum(1) as Object; Common callerRecord = args.getArgNum(2) as Common; |
Class | Pre/Post event | XppPrePostArgs | Class example: SalesLineType salesLineType = args.getThis() as SalesLineType; |
Form | Initialized | xFormRun | FormDataSource purchLine = sender.dataSource(formDataSourceStr([formname],[table])); |
Form | DataSource | FormDataSource | FormDataSource formDS = sender.formRun().dataSource(formDataSourceStr(EcoResProductDetailsExtended, MHSmartATPItemSettings)); MHSmartATPItemSettings smartATPItemSettings = formDS.cursor(); |
Form | DataSource Field | FormDataObject | FormDataSource formDS = sender.datasource(); PurchLine purchLine = formDS.cursor(); |
Form | Form Control | FormControl | FormRun formRun; FormControl formControl; formRun = sender.formRun(); formControl = FormRun.design().controlName(formControlStr(<form name>, <control name>)); someVariable = formControl.valueStr(); |
Form | onClicked | FormControl | FormRun formRun = sender.formRun(); FormDataSource formDSSalesTable = formRun.dataSource(formDataSourceStr(SalesTable, SalesTable)); FormDataSource formDSSalesLine = formRun.dataSource(formDataSourceStr(SalesTable, SalesLine)); SalesTable salesTable = formDSSalesTable.cursor(); SalesLine salesLine = formDSSalesLine.cursor(); |
Form | Pre/Post event | XppPrePostArgs | FormRun formRun = args.getThis(); FormDataSource formDSLogisticsPostalAddress = formRun.dataSource(formDataSourceStr(LogisticsPostalAddress, LogisticsPostalAddress)); LogisticsPostalAddress logisticsPostalAddress = formDSLogisticsPostalAddress.cursor(); |
Table | onDelete | Common | PurchLine purchLine = sender as PurchLine; |
Table | Modified Field Value | Common | TableName itemSettings = sender as TableName; ModifyFieldValueEventArgs fieldEvent = e as ModifyFieldValueEventArgs; //check to see which field was modified switch(fieldEvent.parmFieldName()) { case fieldStr([tablename], [fieldname]): …do stuff break; } |
Table | ValidateFieldValue | Common/DataEventArgs | ValidateFieldValueEventArgs fieldEvent = e; boolean isValid; PurchLine purchLine = sender as PurchLine; //declare the checkFailed isValid = checkFailed(“some error event”); //save the result fieldEvent.parmValidateResult(isValid); |
Table | Pre/Post event | XppPrePostArgs | PurchLine purchLine = args.getThis() as PurchLine; |