You need to sign in to do that
Don't have an account?
User Lookup Auto Population
First off, thanks in advance for any help with this question. I am relatively new to Salesforce.com and this is my first post! Woohoo! Anyway.....
I have two custom fields in my Opportunity page. The first is a required picklist called "Sales Assistance" and the second is a user lookup field called "Sales Resource." What I would like to happen is that if, when saving the opportunity, a user sets the Sales Resource picklist to "No" then the user lookup is automatically populated with the Opportunity owner. If it is yes, then the user will have to select a user on their own (and I have set up a validation rule for this already).
I can set up the workflow but field updates only allow me to select ONE specific user, not the user in a field. This is what my workflow rule currently says, in case this helps:
Rule Criteria | AND( ISBLANK( Sales_Resource__c ) , ISPICKVAL(Sales_Assistance1__c , "NO" ) ) |
Evaluation Criteria | Every time a record is created or edited |
Thanks!
Hey Pcasinelli,
Id have to look at workflows before im a bit rusty on them, but...
Would it be much trouble creating a Trigger that check/sets the data you want?
A trigger before Insert can check whether the field "salesAssistance__c" has been set to TRUE if it has check that the lookup is populated, if not then set the value of the lookup to the record's owner.
Something along the lines of: (havent tested/compiled)
This is off the top of my head, dont qoute me on that code :P .
With a trigger like this one you can enforce that logic and also set whatever values you want.
Let me know if this helps you out ,
Gaston.
Helo,
I have one more requirement related to this question..If i want to auto populate field value at the time of filling details then???
Means above trigger works only when the record is saved then the autopopulated values comes in the fields..but i want when i fill the value in one field other fields automatically populate their values before saving the record..
can anyone give the solution for this??