You need to sign in to do that
Don't have an account?
Trudge
OnClick JavaScript button that's worked fine for 16 months now has "Invalid or unexpected token" error.
Is something out of date with my code? This button has has perfectly fine since July 2017 and now suddenly my users are getting the "Invalid or unexpected token" error.
Any help would be greatly appreciated!!
Any help would be greatly appreciated!!
{!REQUIRESCRIPT("/soap/ajax/32.0/connection.js")} if("{!NPAR__c.Status__c}"=="45-Approved for Sample Requests"){ var Fields = "&RecordType=012C0000000GT5L"; Fields += "&accid={! NPAR__c.AccountId__c }"; Fields += "&CF00N1A000006aAj3_lkid={!NPAR__c.Id}"; Fields += "&CF00N1A000006aAj3={!NPAR__c.Name}"; Fields += "&00NC0000005JZJ5={!NPAR__c.Market_Segment__c}"; Fields += "&CurrencyIsoCode=USD - U.S. Dollar"; Fields += "&opp11=Ideation/Sample"; Fields += "&00N1A000006Ys6M=Recognizing the need for a purchase"; Fields += "&opp5=Existing Customer"; Fields += "&opp3={!NPAR__c.Account__c} - {!NPAR__c.NPAR_Chemical_Name__c} - <add application here>"; Fields += "&ent=Opportunity"; var URL = "/006/e?retURL=%2F{!NPAR__c.Id}" + Fields parent.frames.location.replace(URL); } else{ alert("Status needs to be '45-Approved for Sample Requests' to create an Opportunity"); }
All Answers
Try checking the fields that are they having the permission.
and
try removing the extra spaces from the fields such as below:
to
Hope this helps.