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
BrandiTBrandiT 

Custom Button for New Task will not change Assigned To field or Update Subject

I created a new task button called Media Plan Request.  The button is supposed to assign the task to our media planner (1 person, ex John Smith).  It's also supposed to put "Media Plan Request" in the Subject line and put the whatid as the opportunity the task is created on.  The Whatid part works fine, the rest of it doesn't.

 

Here is the code I'm using:

 

/00T/e?who_id={!Lead.Id}{!Contact.Id}&&what_id={!Opportunity.Id}&retURL=%2F0067000000IF9ym&tsk5=Media%Plan%Request&tsk1_lkid=00570000001GaI5&tsk1=John%Smith

 

What am I missing here?  This is my second custom button today that isn't working  :(

Best Answer chosen by Admin (Salesforce Developers) 
BrandiTBrandiT

Ok I actually figured this one out this morning, guess i just needed a fresh set of eyes on it. 

 

I had % instead of + signs where the spaces should go in the subject and whoid fields.  Once I fixed that, it worked great!

 

Now if I could just get help with the other custom button issue I posted about haha

All Answers

BrandiTBrandiT

Ok I actually figured this one out this morning, guess i just needed a fresh set of eyes on it. 

 

I had % instead of + signs where the spaces should go in the subject and whoid fields.  Once I fixed that, it worked great!

 

Now if I could just get help with the other custom button issue I posted about haha

This was selected as the best answer
mill1012mill1012

Thanks - this is exactly what I was looking for, but how do you find the field names such as tsk1_lkid=00570000001GaI5&tsk1

is the Assigned to field?

 

 I want to add some additional default values to the new task

knightknight


Use Firefox Browser: Download the Firefox Web Developer Tool Bar: https://addons.mozilla.org/en-US/firefox/addon/60?id=60 

In Firefox use the Web Developer add on “Forms / Display Form Details” .This should give you the tsk1_lkid values