function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
VINODKUMAR REDDY KALUVAVINODKUMAR REDDY KALUVA 

How to convert records one custom object to another object

Hi,

I have custom Quote object and order custom object and for those two I have child's objects as well.

Quote----------------Order
    |                            |
Quote line Items--Order Items

for this convert, I need some coding references like blogs or pages.
can someone help me how can I do that dynamically?
Thanks In advance!....


 

Ajay K DubediAjay K Dubedi
Hello Vinod,

There are two ways. Both I had discussed below:-

1. What you can do is use the Data Loader to export all of the field values of the records of one object to another.
  (Data Loader is a client application for the bulk import or export of data. Use it to insert, update, delete, or export    Salesforce records. When importing data, Data Loader reads, extracts, and loads data from comma-separated values (CSV) files or from a database connection.)
2.A custom button and a visualforce page. Visual force page would just have an Action attribute on <apex: page> and a method returning PageReference to the page you want to redirect to and logic to copy/dml on new object. This method will be called from Action on <apex: page>.

You can refer to these link also :-

https://www.salesforcetutorial.com/salesforce-data-loader/   
http://salesforce.stackexchange.com/questions/23055/trigger-to-update-custom-field-from-another-custom-field-on-a-separate-object

Hope this helps.

Thank You.
Ajay Dubedi
dannodanno
For anyone else coming down this path, there is a free package on the app exchange that will do exactly this. Give it a go! https://appexchange.salesforce.com/appxListingDetail?listingId=a0N3A00000FK9alUAD