8

When you try to create a custom button for a Task, if you choose "$Action" in the "Select field type", you have two options to define that button:

  1. $Action.Activity.NewTask - This will take you to a New Task page directly bypassing the record type selection page and assigns the Default Record Type to task.

  2. $Action.Task.NewTask - This will first take you to the Record Type Selection page if there exists any and then to the New Task page.

I want to know why 2 different actions exists as and why these two actions behave differently.

Here is a Link to my other question which made me ask this question.

3

The reason the two different actions exist is because there are different record types that may exist which are appropriate for the Task. In some orgs, they consider all Tasks to be related to a specific record type (often related to the WhoId which points to the account) which they default it to. When that's the case, it bypasses the dialogue where they assign a Record Type.

In other orgs, it appears that's not the case and there may be more than one appropriate Record Type for a Task. When that's the situation, the user is expected to choose the correct Record Type to assign to the new Task.

For more on this, you might also want to look at this discussion.

EDIT

Here's some more from page 123 of the Visual Force Developer's Guide:

"Custom buttons and links are available for activities under the individual setup links for tasks and events. However, you can override a button that applies to both tasks and events by clicking Your Name > Setup > Customize > Activities > Activity Buttons."

From the above, I'd conclude that its possible the org (or user) may have overridden the default properties for either the buttons or pages they're using to create tasks and/or events.

Note: There are separate buttons for Tasks and Events. Ditto for Activities. Any of the three could have custom page layouts. Events and Activities share the same "out of the box" standard page layout, which doesn't preclude an architect from creating a separate one for each of them which I've regularly seen in the orgs I've worked in.

| improve this answer | |
  • Thanks @crmprogdev. Appreciate you taking time to explain this in detail. I had already seen your response in the question you mentioned. I still doubt it has anything to do with record type bypassing. – Shailesh Deshpande Apr 8 '13 at 16:31
  • As Ralph said in that question, can you please point to any documentation w.r.t to this? – Shailesh Deshpande Apr 8 '13 at 16:40
  • At the time I posted, I hadn't seen Peter's response and was referring to @TysonCluff's response. Would appear there's more to come in that discussion. I can't point you to any specific documentation at the moment. – crmprogdev Apr 8 '13 at 19:15
  • Again, like your thought approach, just not sure that's actually how it works. – Ralph Callaway Apr 8 '13 at 21:58
1

AFAIK that action shouldn't exist. So an answer may not be forthcoming on what the actual different is. Based on your experience it appears one difference is that it bypasses the record type selection page. Of course that seems like a "broken by design" feature.

Each action corresponds to either a standard action or a custom button. However if you look at the available Activity Buttons and Links, New Task is not one of them. enter image description here

I'd venture to guess that due to the fact Activity is a polymorphic combination of Events and Tasks that the Activity Action options inherit it from the Task. This is a wild guess and I don't have anything to back this up with.

| improve this answer | |

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.