function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Nadia TempleNadia Temple 

How to use a custom link to create a new task from a lead?

Following the latest release, the hyperlink functionality we have been using to link agents to the telephony app and to create a new task linked to the lead they are dialling off stopped working.

I have been trying to create a new custom link within the lead layout, but I cannot get it to link to the Lead.  
Here is what I have currently:

https://eu1.salesforce.com/00T/e?Task.Subject=Call&Task.Who={!Lead.Id}&followup=1&tsk5=Call&retURL=%2F{!Lead.Id}&Task.Number_Dialled__c=&{!Lead.MobilePhone}&Task.Call_Source__c=Outbound;

window.open('https://xxxxx.xxxx.net.nz/Dialer/Phone/"&{!Lead.MobilePhone}&"','DiallerWindow','status = 1, height = 500, width = 500, resizable = 1');

When I click the custom link, a new task is created but it is not linked to the lead I came from, and the dialler piece does not work.

Help?!

 
Marcelo CostaMarcelo Costa

Hey Nadia...
I guess I can help with the Lead Id part... You are trying to set the Who on the Task as the LeadId... It should actually be the What, as Who are the users assigned with the task...
Try changing the link to:
https://eu1.salesforce.com/00T/e?Task.Subject=Call&Task.WhatId={!Lead.Id}&followup=1&tsk5=Call&retURL=%2F{!Lead.Id}&Task.Number_Dialled__c=&{!Lead.MobilePhone}&Task.Call_Source__c=Outbound;

 

Nadia TempleNadia Temple
Thanks for your response Marcelo.  I have tried the URL you have provided but get the same result.  The fields just wont pull through to the new task created.  When I click the link, I only get the Subject set as call and the task is assigned to myself, but no other data is currently pulling through.  I am not sure what I am doing wrong.  Is there some other way that will set the field values?