function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Steve Gilbert 13Steve Gilbert 13 

defaulting a liiokup field using the values from a picklist

I am trying to see if it is possible to default a lookup field on the account object, Account Payable Control, with a value from the Financial Force custom object General Ledger "Trail Balance 4" field. Have been tryin conbinations of ispickval formuls without luck.  
Best Answer chosen by Steve Gilbert 13
Steve Gilbert 13Steve Gilbert 13
Thanks, and that is exactly what I expected.. always good to ask just in case I missed some new update or tick. Steve Gilbert Sr. Salesforce Administrator 301-575-9131 sgilbert@autotraining.net [cid:image003.png@01D4DFCA.A0705050] www.autotraining.net | 888-471-5800

All Answers

Khan AnasKhan Anas (Salesforce Developers) 
Hi Steve,

Greetings to you!

By default, it is not possible to give a default value for a lookup field. There's an idea (https://success.salesforce.com/ideaview?id=087300000007PidAAE) which is active on the success community for which you can upvote so that it gets available in the future. 

However, you can use a trigger. Please refer to the below links which might help you further with the above requirement.

https://developer.salesforce.com/forums/?id=9060G000000Bh9cQAC

https://stackoverflow.com/questions/16699571/how-to-set-a-lookup-field-via-a-salesforce-trigger

https://salesforce.stackexchange.com/questions/114100/how-to-give-default-value-to-a-lookup-field-using-formula-editor

I hope it helps you.

Kindly let me know if it helps you and close your query by marking it as solved so that it can help others in the future. It will help to keep this community clean.

Thanks and Regards,
Khan Anas
Steve Gilbert 13Steve Gilbert 13
Thanks, and that is exactly what I expected.. always good to ask just in case I missed some new update or tick. Steve Gilbert Sr. Salesforce Administrator 301-575-9131 sgilbert@autotraining.net [cid:image003.png@01D4DFCA.A0705050] www.autotraining.net | 888-471-5800
This was selected as the best answer
Steve Gilbert 13Steve Gilbert 13
Thanks, and that is exactly what I expected.. always good to ask just in case I missed some new update or tick.