0

A URL button hack appears to have stopped working in our org. I am not sure if this is due to a system update or our addition of Communities. The button appears on the "Account" page, pre-populates a new task form, assigns the task to a specific user, and relates it to the Account record from which the button was clicked.

Despite all of the information appearing to be correct on the form. When it is submitted and the task created, the task is assigned to the current user instead of the one specified in the "who_id" of the URL. From what I have been told, this may relate to some updates being done by Salesforce to their infrastructure; migration to Java 8.

What alternatives exist for this simple use-case? I would like to move on from URL hacking (as they appear to be increasingly unreliable) and perhaps create something that will be better supported.

Code is as follows:

/00T/e?who_id=0005500000PjL3Z
&what_id={!Account.Id}
&title=Data request for {!Account.Name}
&tsk5=Data request for {!Account.Name}
&retURL=%2F{!Account.Id}
&tsk1=John%20Doe
&tsk4={!TODAY()+21}
&tsk6=This is a test message!
&tsk12=Not Started

In this case, I am trying to assign the task to John Doe (0005500000PjL3Z) but instead it is assigned to me.

  • 2
    If you want help on the existing button, please post the code. If you really want to move beyond it, flow is a good option that is point-and-click. – CyberJus Apr 9 '15 at 16:34
  • 2
    It may not be broken per-say: Who_Id doesn't control who it is assigned to. Who_Id controls the contact the task is related to. tsk1 is the id of the field that controls who the task is assigned to. – Chris Duncombe Apr 9 '15 at 16:39
  • @CyberJus code has been posted. – toolshed Apr 9 '15 at 17:57
  • @sfdc_ninja thank you for the input, but that does not appear to be working either. – toolshed Apr 9 '15 at 18:04
1

Make sure you also set the tsk1_lkid field.

{!REQUIRESCRIPT("/soap/ajax/29.0/connection.js")}

window.location = "/00T" + "/e?tsk1=UserName&tsk1_lkid=UserID";
0

By all means take a look at Publisher Actions. They do much of the same things we previously had to go to URL hacks for, but are actually supported by Salesforce.

Also worth looking at is the Process Builder as it can do much more complex things than Workflow Rules and may solve this particular Use Case.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.