My Account | Internet Creations
Welcome, Guest.

Setting Case Field Defaults with Custom Buttons

Summary

Case Split version 1.902 and later allows you to configure a global default (Use Original, Use Blank, Use Default) for each Case field on the split page. There is more flexibility through custom URL parameters in Custom Links and Buttons. Not only can you override the global defaults, but each Link/Button you create can have a discrete configuration to accommodate multiple departments, regions, and use cases. You can follow the instructions in this article to create buttons manually, or use the Case Split Button Builder in versions 1.907 and later.

Details

This article will take you through two scenarios:
  1. Default the Owner on the split Case to Current User (which may be different than the Owner on the source Case) and default the Status to Working.
  2. Default the Owner on the split Case to a specific Queue (like Engineering), and set Case Reason to Bug Fix.

You can provide a default for any field on the Case Split page, which is controlled using a field set. Default values can be changed on a case by case basis by the user splitting the case. For information on changing the fields on the Case Split page, see the Case Split setup and configuration pages.

Follow the instructions below to create custom buttons manually, or use the Case Split Button Builder. Review the Case Split documentation for more details.


To get started go to Setup| Cases | Buttons, Links, and Actions.  
Click New Button or Link, then follow the steps below for each custom button you wish to create.
 
  1. Enter a Label name for the new Case Split button. Optionally, enter a Description.
  2. Select Display Type as Detail Page Button (or Link if you prefer).
  3. For the Behavior, select Execute Javascript.
  4. For Content Source, select OnClick javascript.
  5. In the editor, start by copying and pasting the code from the button already provided in the Case Split package and add parameters as desired and pictured below.

Scenario 1: Default the Owner on the split Case to Current User (which may be different than the Owner on the source Case) and default the Status to Working.

/apex/csplit__CaseSplitter?id={!Case.Id}&OwnerID={!$User.Id}&Status=Working
 
Example 1 Screen Shot


Scenario 2: Default the Owner on the split Case to a specific Queue (like Engineering), and set Case Reason to Bug Fix.

/apex/csplit__CaseSplitter?id={!Case.Id}&OwnerID=00G30000000lJYf&Reason=Bug Fix
 
 Screen Shot for Scenario 2
 
 
  1. Save and add the button/link to Page Layouts as appropriate.
 Notes:
  • For any Case field on the Case Split page (in the field set), you can put the field name (not label) into the URL along with a value. Be sure for to supply valid data types. For example, you can't supply a Contact ID in a User lookup field and you can't supply alphanumeric text in a number field.
  • Use this template as a guide:  /apex/csplit__CaseSplitter?id={!Case.Id}&[namespace__]fieldname[__c]='value' or mergefield. namespace__ applies only for target fields in managed packages and can typically be excluded.
Special considerations:
  • Checkbox fields - supply 'true' or '1' for checked; otherwise unchecked
  • Datetime - TEXT()
  • Multiselect - semicolon delimited
  • Richtext - URLENCODE()
  • Lookup/Master detail - 15 or 18 digit IDs are accepted
  • Picklist - string (note that any value will be accepted, not just those defined in the field properties)

Support

Open a Case