I have a request from all users to default the Subject of new Cases to have some verbiage and then display text from a field on the related Contact. IE: Subject = Site ID: XXXXXX (X being the data from the Contact_Site_ID__c field. Can this be done someone without custom apex code? We do not have a developer on the team.

  • When you say default do you mean on the new/edit screen? If not then a workflow on create should be able to do it.
    – Girbot
    Oct 8, 2014 at 14:10
  • Yes, defaulted on the new/edit screen so users can see it and know they don't have to input anything.
    – user7417
    Oct 8, 2014 at 15:03
  • You could does this with a custom URL button and pass through the field as a parameter in the URL - do you use record types?
    – Girbot
    Oct 8, 2014 at 15:37
  • Yes, Girbot we use Record Types. I've never created a custom button before so depending on how intuitive it is, I can give it a try.
    – user7417
    Oct 8, 2014 at 16:45

2 Answers 2


You can create a field update on the subject field from workflow rule that fires 'when a record is created'.

If want the information to populate when on the new/edit screen you will need to create your own edit/new case buttons. There are multiple examples on how do to this on this site and on salesforce blogs.

How do I prepopulate fields on a Standard layout?

Whats wrong with this custom button URL (prepopulating custom lookup field)

  • Thanks Pepe, but we need the subject line defaulted on the new/edit screen so users can see it and know that they don't have to input anything.
    – user7417
    Oct 8, 2014 at 15:04
  • @user7417 I have updated my answer.
    – PepeFloyd
    Oct 8, 2014 at 16:02

Another method you could look at is setting up a Publisher Action. Using Publisher Actions, you can default fields and it's more supported than the URL hack method. However, where to put this Action can be a problem. You could stick it on the Account, Contact, any other objects that a Case should be generated from, but you'll have to make a duplicate Action for each of these objects (you'll have to duplicate in the method below as well). Or you could make a Global Action. Here's a decent article on creating Actions.

PepeFloyd linked to the post on URL hacking. As the answers and comments on that post suggest it's not ideal or supported and does have some caveats (mobile, standard buttons), but it will probably work fine.


cas14 is subject

Keep in mind if you want special characters or spaces in the text you will need to URL Encode them.

  • %2F is "/"
  • %20 is "blankspace"

more info on url encoding here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .