• Nancy Jacobs
  • NEWBIE
  • 0 Points
  • Member since 2014

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 0
    Replies
Thank you to Deepak K Anand for showing me my first intro to code on the Success Community.  I have a new requirement and thought it would be best to bring it over to this forum.  (my first ever post here... feeling kind of cool at the moment).  Below code is for a custom clone button on cases which forces the user to select a record type.  On the new record that is created from the clone button, can a specific picklist value be selected? (standard picklist field istype)


if("{!Case.RecordTypeId}" == "012a0000001Vtj7"){
    location.replace(
        "/setup/ui/recordtypeselect.jsp?" +
        "ent=Case&" +
        "retURL={!Case.Id}&" +
        "save_new_url=/{!Case.Id}/e?clone=1"
    );
}
else{
    location.replace(
        "/{!Case.Id}/e?clone=1"
    );
}