You need to sign in to do that
Don't have an account?
Nerdy
How to insert data from lookup field with apex controller
Hello Community
I have a custom object MyCustomObj__c which has 2 relashionship lookups on Contact Object. Contact1__c and Contact2__c
How can I insert with apex a record in Contact1__c ?
I have a custom object MyCustomObj__c which has 2 relashionship lookups on Contact Object. Contact1__c and Contact2__c
How can I insert with apex a record in Contact1__c ?
Nerdy I think this code will help full for you.
All Answers
and the insert the child like below
Or you can query and assign it also ..like below
When I try to create the contact1__c It gives me this error : Invalid type: contact1__c because it's not an object it is just a lookup field on Contact
Nerdy I think this code will help full for you.