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
Yogesh BiyaniYogesh Biyani 

"Unexpected token ="


I have created a button to update the Task Contact ID  file as follows 
Behavior = Execute Javascript
Content Source = OnClick Javascript 
and 
{!Task.Who}={!Case.ContactId} 

When I use the button, I get the following error message. What am I doing wrong? 

A problem with the OnClick JavaScript for this button or link was encountered:

Unexpected token =


Yogesh
Ajay Nagar 7Ajay Nagar 7
"Unexpected token =" error comes when we use assignment '=' in evaluation condition instead of comparison '=='.Try with this {!Task.Who}=={!Case.ContactId} if you are using this line as evaluation criteria.