[SalesForce] How to copy standard Opportunity objects into a custom object

I have a standard Opportunity object with the appropriate standard and custom fields. Now I have been asked to create a custom object that will have its respective standard and custom fields populated with the Opportunity object and its fields.

How can I copy data/fields from the standard Opportunity object to the equivalent data/fields in my custom object?

Best Answer

As suggested by Mike you can write a trigger to copy the data from one object to another. However if you are looking for a more generic option then you could create a custom setting in ur org to define the field level mapping between opp and the custom object and then use a apex class or trigger to dynamically copy the record from opp object to ur custom object.

Related Topic