feed-icon-32x32.png

Demand Tools by CRM Fusion

Scribe Software

Learn how Salesforce.com can help your business
arrowpointe @ twitter
  • there goes 1 salesforce competitor down for the count. not for reason's you'd expect, though. http://tinyurl.com/4e53ud 1 day ago
  • in Apex Code, for a num from -90 to 90 with many decimal points, should I use a Double or Decimal data type? 1 day ago
  • is there an Apex method to URL Encode a String? for an http request for an example 2 days ago
  • embedding VisualForce into a Page Layout detail section is nice, but it'd be REALLY cool to add it in the related lists area. 3 days ago
  • ah ha! You can mouseover the link and read the Bio line. Problem solved! Way to think ahead Twitter! 3 days ago
  • I wish Twitter would list my followers Bio line when I look at the list. Seems like a logical thing to display there. 3 days ago
  • very happy gmail added thumbnails for TIF files. now i can tell a spam fax from a real one at a glance 3 days ago
  • More updates...

Powered by Twitter Tools.



Dynamically Required Picklists

Although Salesforce does not fully support dynamically required fields, you can use the dependent picklist feature from the Winter ‘06 release to implement this functionality when the field to be required is a picklist field and it’s requirement-rule is based upon another single picklist (or checkbox) field. To illustrate, the following requirement is common for many sales organizations and can use dependent picklists to fulfill it.

Require the end user to select a Reason Lost when the Opportunity Stage is set to ‘Closed Lost’

The steps to accomplish this are:

  1. Create a custom picklist field called ‘Reason Lost’ on the Opportunity Object.
  2. After creating the field, add a Field Dependency with the Stage as the controlling field.
  3. Add Stage as a Controlling Field

  4. Associate all of the Reason Lost values with the Closed Lost controlling value.
  5. Add Reason Lost as the Controlling Value

  6. Add the Reason Lost field to the Page Layout and require that field.
  7. You are already finished!

Here it is in action. While the Stage is set to values with no corresponding Reason Lost values, the Reason Lost field is read-only and is not required. Once the Stage is changed to Closed Lost, the Reason Lost field becomes read-write and is required.

Reason Lost is now required when stage is Closed Lost

5 Comments »

  1. Chris Said,

    March 23, 2006 @ 9:15 pm

    Why not go one step further, and have one consolidated “Reason Won/Lost field” that has different values dependent on if the Stage is Closed Won or Closed Lost? Still required, but more value for the real estate on the page…

  2. Successforce Blog Said,

    March 27, 2006 @ 3:54 pm

    Dynamically Required Picklists to Capture…

    There have been some really interesting best practice ideas emerging from customer and partner blogs. This week Scott Hemmeter wrote about how you could use dependent picklists to create dynamically required picklists. The example he used was a field

  3. Jamie Said,

    March 29, 2006 @ 11:52 am

    Any ideas on how I could create an “action” dependency? I’m trying to create a calendar event when a status field is set to “confirmed”

  4. Scott Hemmeter Said,

    March 29, 2006 @ 12:20 pm

    Re: Jamie’s question:

    Any ideas on how I could create an “action” dependency? I’m trying to create a calendar event when a status field is set to “confirmed”

    You need to do this using Salesforce’s Workflow module, not dependent picklists. The catch is that you cannot create a Calendar event. You can only create a Task. The Task will have a date associated to it, but will only be visible in the Task list on the homepage, not the Calendar.

    Go into your Help link in Salesforce and search on “Managing Workflow”. You will need to read more about Creating a Workflow Rule and Creating a Workflow Task.

  5. Matthew Bennett Said,

    September 8, 2006 @ 11:36 am

    Thanks, Scott, that has worked just fine for me. Nice explanation.

RSS feed for comments on this post · TrackBack URI

Leave a Comment

All comments are moderated. Other visitors will not see your comment until it has been approved.