You need to sign in to do that
Don't have an account?
lopezc
Can I update a lookup Contact field using Workflow rules?
Hi,
I need to update the Owner Id of a Contact each time it is inserted/updated. The Owner Id for Contacts is assigne to each Contact based in some criterias. That is why I was thinking to use workflow rules, however I couldn't find any lookup fields in the list when I chose to update a field in the workflow action options. I really need to update Owner Id for each contact based in custom fields values... Is there any other way to do it if this one is not possible???
Any help?
many thanks!
I need to update the Owner Id of a Contact each time it is inserted/updated. The Owner Id for Contacts is assigne to each Contact based in some criterias. That is why I was thinking to use workflow rules, however I couldn't find any lookup fields in the list when I chose to update a field in the workflow action options. I really need to update Owner Id for each contact based in custom fields values... Is there any other way to do it if this one is not possible???
Any help?
many thanks!
Message Edited by arnt72 on 10-13-2008 05:16 PM
you want to set the lookup field to the ID only of the record that is referenced, not the record as such..
Hope that helps,
Arnt
Hi,
I'm having the same problem and for some reason can't figure out how to set the lookup field to the ID. I only get the option of looking up the object, not the ID. Am I missing something? Thanks in advance for your help!
Although the lookup field points to the object and (in the web interface) always shows you the record's name, the actual value in there is the ID only.
here is some pseudo code, assuming that you have a contact myContact und you want to link it to the Account "Acme":
Account myAccount = [select ID, name from Account where name = 'Acme' limit 1];
myContact.AccountId = myAccount.ID;
point and click configuration has always been and still is one of the key benefits of sfdc. But in some cases (like this one), you reach limits of what you can do. I just tried and the Account is actually not available for a firld update.
You can of course try writing a trigger, but if you have no previous code experience, get ready to spend some time to read the documentation or find a consultant doing it for you. The latter might be more time efficient if you are not planning to learn to code anyways. If you are interested, it can be a lot of fun.
Here is a good point to start, the Apex Code developers' Guide:
http://www.salesforce.com/us/developer/docs/apexcode/index.htm