You need to sign in to do that
Don't have an account?
Ruth Rushton
apex trigger insert custom object 1 field from custom object 2 field
Hi
Can someone please help as I have no Apex experience and I've tried various different previous posts to help but I'm not getting anywhere!
I have two Custom objects, CustomObj1 has a field which is a lookup of CustomObj2, CustomObj1 also has two other fields which I would like to be populated with details from CustomObj2 depending on which lookup is selected.
I think I need a Trigger on CustomObj1 but I don't know how to write the code (I keep getting errors to do with < symbols).
Please could someone help with what code I should be using, I have a Sandbox set-up with data in to test.
Thanks
Can someone please help as I have no Apex experience and I've tried various different previous posts to help but I'm not getting anywhere!
I have two Custom objects, CustomObj1 has a field which is a lookup of CustomObj2, CustomObj1 also has two other fields which I would like to be populated with details from CustomObj2 depending on which lookup is selected.
I think I need a Trigger on CustomObj1 but I don't know how to write the code (I keep getting errors to do with < symbols).
Please could someone help with what code I should be using, I have a Sandbox set-up with data in to test.
Thanks
All Answers
The lookup field on obj1 is called Category and I want the Recurrence field on Obj1 to equal the Recurrence field on Obj2
I haven't had much sleep and my brain isn't working properly!
Error: Field Recurrence__c is a picklist field. Picklist fields are only supported in certain functions
Yes, it will automatically be updated in obj1, that's the beauty of formulas. Try it out!!