May 2019
Intermediate to advanced
546 pages
12h 41m
English
Custom build applications, or trigger functionality, does not have some of the queries we saw previously. These queries are based on the user's input or on dynamic parameters. In that case, you can create your queries in two ways:
String sAccountName = 'Burlington%';String sQuery = 'SELECT Id, Name FROM Account WHERE Name Like \'' + sAccountName + '\'';List<Account> lstAccounts = (List<Account>) Database.query(sQuery); // we cast the result of the query (a list with SObjects) to a list with accounts
Read now
Unlock full access