auto populate the primary contact field with the logged in user

136 Views Asked by At

there's a field in a form which is a lookup to the contact entity. Also,there's the OOB owner field in crm which is a lookup of system user type. The requirement is to write a javascript which will auto populate the primary contact field with the logged in user i.e with the name of the logged in user same as owner field in crm.

1

There are 1 best solutions below

0
On

Won't work, contact and system user are different entity types. You can't put a system user in a contact lookup (or vice versa).

You could try which is probably the closest you can get:

  1. Create a new lookup on system to contact.
  2. Create a workflow which creates a contact for each system user.
  3. Set that system user > contact field in the contact lookup - using workflow is easiest.

Or, hide the default contact lookup from your entity and add a system user lookup.