November 8, 2016
November 6, 2016
Before we start
Besides our current merchandise object, we need to quickly create two custom objects – Customer and Transaction. Customer object has one custom field called Address which is a text field and Transaction object has two lookup relationship fields pointing to Customer and Merchandise. Don’t forget to create tabs for both objects as well. Create a few records for both objects.
November 5, 2016
In the last chapter, we have talked about how to use DML statements and Database methods to modify data from Salesforce database. In this chapter, I will show you how to retrieve data. Apex used a feature called SOQL language to retrieve the data. And SOQL statements are first class citizens in Apex as well.
November 4, 2016
Let’s first try to execute the following code first.
November 3, 2016
In our last post we have mentioned that DML statements only executes in one transaction. So what if we want some of the data to be persisted if we can, regardless of others may fail? Database operations will serve us for that purpose.
November 2, 2016
One important concept about DML is it will be executed in one transaction. So if you insert or update or delete a list of records, it either all succeed or all fail.
November 1, 2016
Why do we need a test data setup framework
Because it is almost mandatory to generate a set of test data for each test case. And the work is tedious. Consider the following code: