You need to sign in to do that
Don't have an account?
Mike Fitch
Related list for a custom object not auto populating lookup fields
I created a custom object in my org and created custom lookup fields for account and contact so they would show up in the respective related list. When i create a new record for my custom object via the related list in either account or contact it does not pre populate the lookup field. The users have to click the lookup magnifying glass and select the account or contact themselves. How do I fix this?
The system will never populate both as it doesn't know what value should be used for the second field. If you come from an account page would it know which is the desired contact to use? You could facilitate the population of the alternative field on save, either through workflow or a trigger.
Assuming the account field is going to lookup to the contact's account, is it really needed? You'd have access to the account id via the contact, MyObj__c.Contact__r.AccountId. If it is required, is the user going to need to edit it from the new record screen or could you just hide it and fill it in on save via trigger?
Object 1 Record 1 -> populate Lookup to Object 2 Record 2 ID
Object 2 Record 2 -> populate Lookup to Object 1 Record 1 ID
So if they both have lookups pointing to each other, they'll populate their respective related lists.
If that makes sense.