+ Start a Discussion
tstrongtstrong 

Populating Contact on a Project created from a Case

Background:

 

I downloaded the app Project and Issue Management from the appexchange (http://sites.force.com/appexchange/listingDetail?listingId=a0N300000016bL9EAI).

 

I added the Case lookup field to the Project object.  I then added the Project related list section to the Case page layout.  There is a "New Project" button on the related list.  When you click this, it auto populates the Case number on the Project record.  Similarly, when you add the Project related list to the Contact, you can create a "New Project" from there that auto populates the Contact field on the Project.

 

Now my question:

 

Has anyone written a trigger that would update the Contact field with the ContactId from the related Case on Insert?

 

Normally you could do this with a workflow, but you can't update a lookup field via a workflow field update action.

Message Edited by tstrong on 09-18-2009 03:19 PM
MCunninghamMCunningham

have you considered using a cross-object formula field on the Project that simply shows the Case.Contact ?

 

This would be a read-only field.

 

rgds

 

Michael

tstrongtstrong
We have that field on the Project, but the users want it to populate the Contact field so that they will see the Project on the related list on the Contact record.  It basically comes down to having to copy and paste the person's name in the Contact field, so this is a usability issue.