Error: Symbol “function()” was not found

This error occurs when trying to view the value of system functions in the debugger.  One way around this is to print the function:print function();

Error: Request for the permission of type ‘SqlStatementExecutePermission’ failed.

This error occurs when running  “statement.executeQuery(sqlString);” from a job.  Once the code is put in a class to run on the server, it works fine.  For example:server static void main(Args _args)
{
    Connection connection = new Connection();
    Statement statement = connection.createStatement();
    str sqlString = ‘select * from custTable’;
    ;

    new SqlStatementExecutePermission(sqlString).assert();
    statement.executeQuery(sqlString);
    CodeAccessPermission::revertAssert();
}

 

Refreshing a grid with code changes

FormDataSource formDataSource = PurchLineTable.dataSource();
Common common = formDataSource.cursor().data();
;

//Updates the selected record
PurchLineTable.PurchStatus = 3;
PurchLineTable.update();

//Refreshes the datasource
formDataSource.research();

//Reselects the selected record
formDataSource.findRecord(common);

//Updates the form by refreshing the view of all the records in the data source.
formDataSource.refresh();

Refreshing a grid with code changes

The following code updates a field of the selected row in a grid and then refreshes the grid to show the change maintaining the selection state.


FormDataSource formDataSource = PurchLineTable.dataSource();
Common common = formDataSource.cursor().data();
;
//Updates the selected record
PurchLineTable.PurchStatus = 3;
PurchLineTable.update();

//Refreshes the datasource

formDataSource.research();

//Reselects the selected record
formDataSource.findRecord(common);

//Updates the form by refreshing the view of all the records in the data source.
formDataSource.refresh();

Suspending code execution with events

This appears to be a bug which still persists in 2009, where breakpoints in events are ignored. To get around this, one has to add the line of code: “breakpoint;”.

Suspending code execution with events

This appears to be a bug which still persists in 2009, where breakpoints in events are ignored. To get around this, one has to add the line of code: “breakpoint;”.