You need to sign in to do that
Don't have an account?
Raja Jammula
Java script URL date field not populating correctly can anyone please help?
I am using below script:
<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") {
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" oncomplete="setLogcallURL()" rendered="{!contact.CSG_Status__c == 'Active'}"/>
&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 anyone let me know what i have to change here to populate the date as 09/26/2017
<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") {
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" oncomplete="setLogcallURL()" rendered="{!contact.CSG_Status__c == 'Active'}"/>
&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 anyone let me know what i have to change here to populate the date as 09/26/2017
Asif Ali M
Use the below code for mm/dd/YYYY format