Posted on May 30, 2019 Leave a Comment
The clearOutRecords would iterate all the fields passed as the currentRecord, then: 1. Exclude the fields as part of the fieldsToExcludeForClearOut Set and relationship fields 2. Check if the field is not null and updateable 3. Special logic to set fields to predefined values 4. Set all other fields to null 5. Return the SObject […]
Posted on February 18, 2019 Leave a Comment
Sorting a list of Analysis messages first by boolean and then integer. First we will order by condition and then order. All records where condition is true is will be on top in descending order on top followed by all false condition in descending order. SummaryAnalysisMessages object to sort Compare object by condition and then […]
Posted on June 2, 2017 Leave a Comment
Sometimes you want to determine what has changed between an existing record in the database and an update to the record. The diffRecord method will return all the fields that changed for a specific record. Compare the difference between to records and return changed fields Test that only changed fields are returned
Posted on May 31, 2017 Leave a Comment
When you have two record, one being the existing queried record and the other the updated record. To merge the original with the updated field without committing the changes you can iterate the current record’s fields and check which of the fields changed. Update the changed fields to the new updated fields value. Now we […]
Posted on April 16, 2012 Leave a Comment
package com.thysmichels; import java.io.IOException; import com.sforce.soap.partner.*; import com.sforce.ws.*; public class SalesforceGlobalSearch { /** * @param args * @throws IOException */ public static void main(String[] args) throws IOException { // TODO Auto-generated method stub ConnectorConfig sfconfig = new ConnectorConfig(); //Use your salesforce username = email sfconfig.setUsername(“username”); //Use your saleforce password with your security token look like: […]