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
alok29novalok29nov 

Need to update some field of an object with the fileds of some other object

Hi All,

 

I have a requirement where I need to update some fields of opportunity. I have another custom object  with many fields( apprx 10000 records). Now I need to update fields of oportunity with the filds of custom object. Records are already present in both the object. What would be the best solution for this.

 

Thanks in advance!

 

Regards

Alok 

Best Answer chosen by Admin (Salesforce Developers) 
BaguiarBaguiar

Is it something that would require the update of a field in one of the objects once a user updates a record ? If so, then you can do it through a trigger or maybe through a simple Workflow rule, and activate it right after you mass update all the records you need to do. For the mass update, I still would use data loader to do so. I'm sure you might be able to do a sort of trigger, but you'd end up having to touch all the records for the trigger to work.

 

Data loader should be a lot simpler for the mass update and then, you'd have to write only a trigger or workflow rule to update the fields in either object, based on the user entry.

All Answers

BaguiarBaguiar

I think your best route would be through Data Loader, specially because of the amount of records. You can download both objects, update the records using a tool of your choice (SQL, Excel, MySQL...) and then, run the updates back to SFDC through Data Loader again.

 

B

alok29novalok29nov

Thanks for your prompt response Baguiar! I have one more query. Is it  possible to do the same using batch apex ,rigger or some apex coding?

alok29novalok29nov

Actually, I have data which is very complex to update outside as I used some macros (other team) to update fields and run some formulas. So , I am looking for ways where

I can update data inside salesforce itself.

BaguiarBaguiar

Is it something that would require the update of a field in one of the objects once a user updates a record ? If so, then you can do it through a trigger or maybe through a simple Workflow rule, and activate it right after you mass update all the records you need to do. For the mass update, I still would use data loader to do so. I'm sure you might be able to do a sort of trigger, but you'd end up having to touch all the records for the trigger to work.

 

Data loader should be a lot simpler for the mass update and then, you'd have to write only a trigger or workflow rule to update the fields in either object, based on the user entry.

This was selected as the best answer
alok29novalok29nov

No Baguiar, It's a mass update. So as you suggested, data loader is the best option.