You need to sign in to do that
Don't have an account?
OnClick JavaScript Button does not create task correctly
Hello everyone,
I have created a JavaScript button which is creating a curious effect. Upon clicking the button, it should create a task alerting another user that a lead is ready for their review. The fields should auto populate with the other users Name and Lead info through the use of a URL hack.
Instead, when the task is created, it notifies the creator of the task and attaches to a Contact of the same name as the lead. I find that if I click the magnifying glass next to the Assigned to User Field and the Name Lead field it works correctly. Any idea what might cause this or how to correct it?
Below is the button code. Thank you for your help,
if ({!Lead.Description} == "ceuenrollment") {
window.location = "/00T/e?tsk1=Certifications%20User&tsk2={!Lead.Name}&RetURL={!Lead.Id}&email=1&tsk2_mlktp=00Q&IsReminderSet=0&tsk5=CEU%20Order";
}
else if ({!Lead.Description} == "certrenew") {
window.location = "/00T/e?tsk1=Certifications%20User&tsk2={!Lead.Name}&RetURL={!Lead.Id}&email=1&tsk2_mlktp=00Q&IsReminderSet=0&tsk5=Cert%20Renewal";
}
else if ({!Lead.Description} == "certreplace") {
window.location = "/00T/e?tsk1=Certifications%20User&tsk2={!Lead.Name}&RetURL={!Lead.Id}&email=1&tsk2_mlktp=00Q&IsReminderSet=0&tsk5=Replacement%20Display%20Certificate%20Request";
}
else {
alert("This lead can not be marked as paid.");
}
for that you have to set one more parameter "tsk1_lkid" and its value should be the id od intended user .
All Answers
try adding some more parameters in the url :-
tsk2_lktp=00Q&tsk2_lkid={!Lead.Id}&save=1
it should work then.
what is the error you are facing ?
I am not recieving any error messages or alerts, however the tasks are notifying the current user instead of the intended user unless the current user reselects the intended user's name using the magnifying glass lookup field.
for that you have to set one more parameter "tsk1_lkid" and its value should be the id od intended user .
That seems to work! Thanks!