Generate an sObject with all the required fields & relationships auto-filled
Contact con = (Contact)TDF.createSObject('Contact');
Assign values to fields of the main and the related sObjects
Contact con = (Contact)TDF.createSObject('Contact', new Map<String,Object>{
'Email' => '[email protected]',
'Account.Description' => 'Text for the Description field on the Account'
});
Apache 2.0