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
Shawn Low 24Shawn Low 24 

What does the error "string literal contains an unescaped line break" mean

User-added image

Thank you
Best Answer chosen by Shawn Low 24
Rahul.MishraRahul.Mishra
Copy paste the below code, I did not use window.open here, let me know if it works as expected.
'/00T/e?tsk1_lkid='+'{!$User.Id} '+' &tsk5=Community Appointment from NHS '+' &who_id='+'{!Lead.Id} '+' &00Nf100000CUVrJ={!Task.Division_v2__c } '+' &tsk13=Normal&tsk12=Not Started '+' &00Nj000000AMbZA=Community Appointment from NHS'
Thanks,
Rahul
 

All Answers

Rahul.MishraRahul.Mishra
Hi,

Error is because you did not escaped char in your string properly, does you string looks like this : 'This is Bob\s string' ?, if so escape closing single quote as : 'This is Bob\'s string'.

Thanks,
Rahul.

Mark solved if you have got your answer.
Shawn Low 24Shawn Low 24
Hi Rahul,
It looks like this...

window.open('/00T/e?tsk1_lkid='+'{!$User.Id} '+' &tsk5=Community Appointment from NHS '+' &who_id='+'{!Lead.Id} '+' &00Nf100000CUVrJ={!Task.Division_v2__c} '+' &tsk13=Normal&tsk12=Not Started '+' &00Nj000000AMbZA=Community Appointment from NHS');

Can you locate where I am getting this?
Rahul.MishraRahul.Mishra
Copy paste the below code, I did not use window.open here, let me know if it works as expected.
'/00T/e?tsk1_lkid='+'{!$User.Id} '+' &tsk5=Community Appointment from NHS '+' &who_id='+'{!Lead.Id} '+' &00Nf100000CUVrJ={!Task.Division_v2__c } '+' &tsk13=Normal&tsk12=Not Started '+' &00Nj000000AMbZA=Community Appointment from NHS'
Thanks,
Rahul
 
This was selected as the best answer
Shawn Low 24Shawn Low 24
Hey Rahul,
Thank you so much, your code had enabled me to see where I was making my error and now I have the field referencing correctly and everything is working fantastically. Thank you so much.