I have 5 record types in case object and following is the code that i used for the list button in order to choose record type and create case.


If the opportunity Name contains "#" key, Whatever record type i select it redirects to the default record type. It works perfectly fine if there is no "#" in the opportunity name. Also I am creating the case from opportunity. Please help me fix this.

  • 1
    # is special character which break the URL. Try to encode it. Commented Jul 11, 2018 at 7:25

2 Answers 2


I think this would help you {!URLENCODE(Opportunity.Name)}

  • 2
    This answer would be improved if you explained why your proposed solution should work. Also, for simple things like this, it's a good idea to try it for yourself in a sandbox to make sure that it does, in fact, work.
    – Derek F
    Commented Jul 11, 2018 at 13:07

Create a workflow rule on creation of case object, in criteria use contains function to check it name contains a #. In action assign record type you want .

Check this link to example of contains keyword


  • Thank You for the answer Amit, But the problem is I should be able to select any 1 of the 5 record types. Requirement is not to select a particular record type based on the # key
    – Umair Ayaz
    Commented Jul 11, 2018 at 7:27

You must log in to answer this question.

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