Find your content:

Search form

You are here

How to populate a lookup based on a Id

 
Share

Is there a way I can lookup an User based on Id/ name I want to achieve the following

1) Object A has User lookup when the User lookup changes I am using a formula on related object to Object A to populate the ID/name of the lookup

2) I do not want to use a trigger. I want to associate the lookup populate on the object B based on Object A lookup changes.

Please point me if there is a simple solution,

I tried to trigger a workflow based on formula change. (bummer can't do this, still tried for nothing)


Attribution to: Rao

Possible Suggestion/Solution #1

If you don't need the dependent field to be a lookup but can satisfy your need by using a cross object formula to display the information then your best doing that. Otherwise it will have to be a really simple trigger I'm afraid. What are your specific resevations about a trigger. Is having a filtered lookup to get the user to select the second lookup an option at all?


Attribution to: techtrekker

Possible Suggestion/Solution #2

Unfortunately you can't trigger a workflow rule unless the record is saved. Formulas change dynamically and do not require a save.

Are you able to use "Reevaluate workflow Criteria" and use a checkbox to act as a switch so to speak? you could use a regular text field rather than a formula as well.

Run an export of all the records that are of the object with the formula. Change it to a text.

Set a Workflow Rule to update the text field with the same information the formula was using. It will also check a checkbox that's not visible on the page layout. This will reevaluate workflow criteria. Then set a workflow that the requirement is that checkbox is true. It does the other action and also sets the checkbox to false.

Run the import. be careful how many workflow rules you're goign to trigger, my recommendation is if it's going to be a lot on the import, turn off any email notifications, etc. and run the import in smaller batches.


Attribution to: Randy E
This content is remixed from stackoverflow or stackexchange. Please visit https://salesforce.stackexchange.com/questions/1908

My Block Status

My Block Content