Posts

Showing posts from February, 2010

Nexus One

The nexus one video series are awesomee, one nexus one please.

Force.com Apex Merge/Replace Class ;)

Hello again! I just developed an Apex class for performing replace/merge operations on any kind of object, and yes any kind of relations as well! , so it doesn't matter if you have master-detail relationships that can't be modified, objects tied in a master-detail relationship will be cloned, deleted and inserted with the new values to simulate a merge operation! To use the Merge class  just create an ObjectMerge instance, passing as an argument of the constructor your current record: ObjectMerge oMerge = new ObjectMerge(SourceObject); And to peform the merge operation just use the replaceRecord method and thats it!, you can specify if you want to delete the source record after the merge operation is done. oMerge.replaceRecord(MergeToThisObjectID,DeleteSourceObject); You can limit the number of records that will be processed in the merge operation for Master-Detail relations  to avoid hitting governor limits. The ObjectMerge class will let you know if there are any