Apex Flashcards

1
Q

What is the syntax of a trigger?

A

trigger TriggerName on ObjectName (trigger_events) {
code_block
}

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

When should you use triggers?

A

Use triggers to perform tasks that can’t be done by using the point-and-click tools in the Salesforce user interface. For example, if validating a field value or updating a field on a record, use validation rules and workflow rules instead.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

How do you export the results of a test run using the SOQL workbench?

A
  • Log into the workbench
  • Navigate to SOQL Query
  • Select the ApexTestResult object
  • Select View As “List” to view or “Bulk CSV” to export
  • Select the required fields and filter (the AsyncApexJobId of the last run for example) and sort as required
  • Press query
How well did you know this?
1
Not at all
2
3
4
5
Perfectly