+ Start a Discussion
JillWJillW 

Help with Opportunity Name field

In the Asset object, when I choose a Product, it automatically puts the Product Name into the Asset Name. I want to do something similiar in Opportunity.


I've created a picklist for Opportunity Description. I want the Opportunity Name to be filled in with the Opportunity Description immediately after the user selects an Opportunity Description.


How is this done in Assets and how can I recreate that in Opportunities?

JakesterJakester
That Asset business is done by triggers written by Salesforce. Assuming you have Enterprise Edition or higher, you can easily make a workflow rule that fires when the Opportunity Desc is selected that updates the Opportunity Name with whatever was picked.
JillWJillW
I've tried adding a workflow rule, but I can't figure out how to make it fire when the description is selected.
JakesterJakester
You want it to trigger on IsChanged(your_picklist_here__c)
JillWJillW

Thanks for the tip. However, I can't make it work. All I get is an error message:

 

Error: Function ISCHANGED may not be used in this type of formula.
Message Edited by JillW on 06-02-2009 03:39 PM
JakesterJakester
I don't know how to say this without sounding like a smart-a$$, so forgive me, but ... that means you need to change the formula type.
JillWJillW

I'm completely lost here. What am I supposed to change the formula to?

JakesterJakester

Ah-

 

Well, you're going to go back to the workflow rule (Setup-->Create-->Workflow Rules & Approvals-->Workflow Rule), and then click Edit, and then change the Evaluate rule to  "Every time a record is created or edited"

JillWJillW

Oh, yay! This works almost exactly the way I want it to. The last obstacle is that the name doesn't change until I save the opportunity. (I'm foreseeing a lot of complaints about that.)

 

Do you know how I can tell SF to change the name field BEFORE save?

JakesterJakester
Definitely can't do it before, that's just how Salesforce works.
JillWJillW

*Sigh*

 

This is so frustrating. The Asset page works exactly the way I want the Opportunity page to work. I choose a product and the Asset name is immediately filled in. I don't understand why I can't do the same thing in the Opportunity.

 

It seems simple. Choose a description and have the Opportunity Name immediately filled in. Any idea where I can find the answer to this?

JakesterJakester
I know that's frustrating, but it's pretty typical with Salesforce. In general, I've found that you can do almost anything with this system, but you can't be too picky about exactly how it works. The upside is that it's incredibly easy to do and won't break when they upgrade to newer releases.
JillWJillW
Unfortunately, I'm not the one being picky and the users expect me to make things work the way they want them to work. :smileysad: