You need to sign in to do that
Don't have an account?
Kevin Dal Porto
Update Lookup field with trigger or Workflow
While viewing a standard Contact object, I press new to create a new record in a custom related list object. The New Custom object record populates the Contact lookup field, but does not populate the Account Lookup field. I need to populate the Account Lookup field. What is the best way to accomplish this knowing that I plan to create a managed package which would proclude any use of URL hacking or other non-Salesforce accepted practices?
I was looking into this. If you want to actually see the Account field populated immediately, I believe the only options are URL hacking (via custom button) or combining a custom VF page and a custom button. The latter would be an acceptable Salesforce practice. You could create a custom page just for this scenario - creating the object as a child of a Contact from the Contact related list and automatically populate the Account based on the populated Contact record.
A workflow wouldn't really work, because you can't set a lookup dynamically within workflow rules.
What do you think?
Thanks,
Phil
All Answers
I was looking into this. If you want to actually see the Account field populated immediately, I believe the only options are URL hacking (via custom button) or combining a custom VF page and a custom button. The latter would be an acceptable Salesforce practice. You could create a custom page just for this scenario - creating the object as a child of a Contact from the Contact related list and automatically populate the Account based on the populated Contact record.
A workflow wouldn't really work, because you can't set a lookup dynamically within workflow rules.
What do you think?
Thanks,
Phil