function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Sarah OsburnSarah Osburn 

srcUp OnClick JavaScript button

I'm trying to create a button on case console called New Customer Service Case.  It shoudl create a case of a specific record type (Customer Service Case) and I can't get the button to work - "Illegal Character" 

srcUp (‘ /500/e?retURL={!Case.Id} &cas5=Customer Service Case&isdtp=vw&def_case_id={!Case.Id} &RecordType= 012L00000008mRV’);
Best Answer chosen by Sarah Osburn
ShashForceShashForce
The qoutation characters are in a different format, probably due to copy-pasting from a different formatted text. Please try this line instead:

srcUp (' /500/e?retURL={!Case.Id} &cas5=Customer Service Case&isdtp=vw&def_case_id={!Case.Id} &RecordType= 012L00000008mRV');

All Answers

logontokartiklogontokartik
I see that you have a space and then /500. Can you remove the space and try

srcUp ('/500/e?retURL={!Case.Id}&cas5=Customer Service Case&isdtp=vw&def_case_id={!Case.Id}&RecordType=012L00000008mRV');


ShashForceShashForce
The qoutation characters are in a different format, probably due to copy-pasting from a different formatted text. Please try this line instead:

srcUp (' /500/e?retURL={!Case.Id} &cas5=Customer Service Case&isdtp=vw&def_case_id={!Case.Id} &RecordType= 012L00000008mRV');
This was selected as the best answer
Sarah OsburnSarah Osburn
That worked!!  Thank you @Shashank_SFDC!!