When I use the JSENCODE
I have the following issue:
var accRegNumber = "{!Account.Registration_Number__c}";
var accName = "{!Account.Name}";
var accType = "{!Account.Custom_Filed_Type__c}";
var accRate = "{!Account.Custom_Filed_Rate__c}";
var accId = "{!Account.Id}";
accRegNumber = {!JSENCODE(accRegNumber)};
accName = {!JSENCODE(accName)};
accType = {!JSENCODE(accType)};
accRate = {!JSENCODE(accRate)};
accId = {!JSENCODE(accId)};
Error: Field accRegNumber does not exist. Check spelling.
Could you please advise why adding {!JSENCODE(accRegNumber)};
to accRegNumber
variable is giving an error message?