You need to sign in to do that
Don't have an account?
sbansal
Apex class
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
This is what your trigger should be like , And this will work for bulk data as well as insert statement is used out side the foor loop
Hi Shashikant,
I have a similar request and tried the trigger you replied with using the same details as the original problem (just for testing) but this does not run. It compiles without errors, but the result is not there. The fields do not update.
My trigger needs to apply to a custom field in the Quotes Line Item object checking the same (named) custom field in the Opportunity Line Items object, and inserting this record.
Our Sales don't want to double handle a picklist field and want this autocompleted when it comed to generating quotes.
Any assistance appreciated.
I tried above trigger but it is not working please give me updates
I am getting below error message
kindly give me your inputs
Error: Compile Error: Incompatible element type SOBJECT:Member2__c for collection of SOBJECT:Member1__c at line 15 column 3