You need to sign in to do that
Don't have an account?
sbansal
copy field values of one object to another object
HI
Salesforce Community
I am new to Apex & trigger
I have created two custom objects Member & Member2, and same fields for both the object, now i want to insert the values of member fields into Member2 fields, such as Firstname and lastname,
Help me to get code for this
Hi,
At what time do you want to insert values to Member2?
Assuming you want to insert valses to Member2 when inserting to Member;
You can write a trigger for Member to insert values to Member2.
Above is a example for get an idea.
If a reply to a post answers your question or resolves your problem, please mark it as the solution to the post so that others may benefit.
Chamil's Blog
All Answers
Hi,
At what time do you want to insert values to Member2?
Assuming you want to insert valses to Member2 when inserting to Member;
You can write a trigger for Member to insert values to Member2.
Above is a example for get an idea.
If a reply to a post answers your question or resolves your problem, please mark it as the solution to the post so that others may benefit.
Chamil's Blog
Duplicate post :
http://boards.developerforce.com/t5/Apex-Code-Development/Apex-class/td-p/314797
Thanks
Ankit Arora
Blog | Facebook | Blog Page
Thanks Chamil,
This is helpful and I think I've adapted this to my two objects, but I don't know how to create a class that can work with this trigger. Could you offer help there too?
You can create class as normal way. then u can access methods of that class by using a instance of that class.
Thanks this was super helpful!
~Red
Thanks Chamil, but I don't know how to create one the normal way. Could you point me to more information about creating that? I'm not a developer but do understand the process however and can adapt blocks of code to my application fairly well if I have a good starting point.
http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_classes_defining.htm
Hi,
Need some help urgently.
This solution is ok if there 1-2 fields, but what if there are 40 fields and I want to copy their value.
Is there a good way to do that?
Thanks in advance,
Siddharth
Hi All ,
I am new in Development , I need your help.
My Requirement is like that.
I have 2 custom Object Member and Member Location ,In Member Location there is 5 fields Country , Zip code ,State ,District and charecter Lenght .
And in Member Object there are 5 field Member Name ,Country ,Zip Code State and District .
what i have to do is when i create any New Member i need to fetch district and state based on Zip code from Member Location Object.
In Member Location there is already these data are present .
I need to fetch State and district based on country and zip code .which are present in member location.
Hope u guys understand my Requirement.
Please help me out
Thanks in Advance
I have a field on the opportunity called DeliveryInstallationStatus__c (text field) and the same field DeliveryInstallationStatus__c on the quote object. I created a Process Builder which copies the info from the opportunity and places it on the quote. It works at the start, but then when I update the field on the opportunity and hit save I get an error. Basically the process builder is failing.
Is the a way for this to be done in Apex so when the field is edited after the initial entry and then saved the field on the quote object will update and not throw me an error.
Thanks in advance for this help