Salesforce.com Unit Testing Data Factory
Apex
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
src/classes
.gitignore
LICENSE
README.md

README.md

DataWizFactory

Salesforce.com Unit Testing Data Factory

Example Usage

To create an Account with all fields populated and parent records:

DataWizFactory.createFullObject('Account', **false**, true);

To create an Account with REQUIRED FIELDS ONLY, and parent records:

DataWizFactory.createFullObject('Account', **true**, true);

To create an Account with all fields populated and no parent records:

DataWizFactory.createFullObject('Account', false, **true**);

Main method for creating records:

public static SObject createFullObject(String sObjectType, Boolean fillOnlyRequired, Boolean createReferences)

Params

fillOnlyRequired Set to TRUE if you want to populate only REQUIRED fields.

createReferences Set to TRUE if you want to create related reference records on lookup fields.