You need to sign in to do that
Don't have an account?
Raja Jammula
URL No longer exists error when executing onclick javascript button can anyone please help
Hi, i am getting this error:
URL No Longer Exists
You have attempted to reach a URL that no longer exists on salesforce.com.
this is the javascript button i am using:
{!REQUIRESCRIPT("/soap/ajax/29.0/connection.js")}
var url='/00T/e?title=Call&who_id={!Contact.Id}&&retURL=/{!Contact.Id}'
if("{!$Profile.Name}" == "WICS" && ("{!$UserRole.Name}"=="AE - E"||"{!$UserRole.Name}"=="AE - W"||"{!$UserRole.Name}"=="AE - S")){
url+='&tsk5=Meeting';
url+='&tsk4={!TODAY()}';
url+='&tsk12=Completed';
url+='&RecordType=0120j0000008dlO';
url+='&ent=Task';
}else if("{!$Profile.Name}" == "WI Corporate Sales") {
url+='&tsk5=Call';
url+='&followup=1';
url+='&tsk4={!TODAY()}';
url+='&RecordType=01250000000HiDD';
url+='&RecordType_fu=01250000000HiDD';
}else{
url+='&followup=1';
url+='&tsk5=Call';
}
window.open(url,'_blank');
i am not getting where i am going wrong here can anyone help
URL No Longer Exists
You have attempted to reach a URL that no longer exists on salesforce.com.
this is the javascript button i am using:
{!REQUIRESCRIPT("/soap/ajax/29.0/connection.js")}
var url='/00T/e?title=Call&who_id={!Contact.Id}&&retURL=/{!Contact.Id}'
if("{!$Profile.Name}" == "WICS" && ("{!$UserRole.Name}"=="AE - E"||"{!$UserRole.Name}"=="AE - W"||"{!$UserRole.Name}"=="AE - S")){
url+='&tsk5=Meeting';
url+='&tsk4={!TODAY()}';
url+='&tsk12=Completed';
url+='&RecordType=0120j0000008dlO';
url+='&ent=Task';
}else if("{!$Profile.Name}" == "WI Corporate Sales") {
url+='&tsk5=Call';
url+='&followup=1';
url+='&tsk4={!TODAY()}';
url+='&RecordType=01250000000HiDD';
url+='&RecordType_fu=01250000000HiDD';
}else{
url+='&followup=1';
url+='&tsk5=Call';
}
window.open(url,'_blank');
i am not getting where i am going wrong here can anyone help
All Answers
you need to have complete url
and i am getting the above error while using this URL
<script>
function setLogcallURL(){
var url='/00T/e?title=Call&who_id={!Contact.Id}&retURL=/{!Contact.Id}'
if("{!$Profile.Name}" == "WI" && ("{!$UserRole.Name}"=="AE - E"||"{!$UserRole.Name}"=="AE - W"||"{!$UserRole.Name}"=="AE - S")){
url+='&tsk5=Meeting';
url+='&tsk4={!TODAY()}';
url+='&tsk12=Completed';
url+='&RecordType=0120j0000008dlO';
url+='&ent=Task';
}else if("{!$Profile.Name}" == "WI Corporate Sales") {
url+='&tsk5=Call';
url+='&followup=1';
url+='&tsk4={!TODAY()}';
url+='&RecordType=01250000000HiDD';
url+='&RecordType_fu=01250000000HiDD';
}else{
url+='&followup=1';
url+='&tsk5=Call';
}
window.open(url,"_self");
}
</script>
from vf page:
<apex:commandButton value="Log a Call" onclick="setLogcallURL()" rendered="{!contact.CSG_Status__c == 'Active'}"/>
when i click a button it's reloading the same page and not calling the url
when i change to window.open(url,'_blank'); then it loads the page in seperate tab.
And &tsk4={!TODAY()} it's not the populating the date correctly
it's populating as: Tue Sep 26 00:00:00 GMT 2017 instead 09/26/2017
can you let me know where i am going wrong here