+ Start a Discussion

Custom Buttons - HELP !



I'm a very new in all the salesforce business

i'm trying to make a new button in the account that will open me a new task with some data in the fields



Someone can help me ?







Hey Elad,


I just went through a very similar little excersize last week.


My first suggestion would be to google "salesforce custom buttons" and do a little reading.


Most likely your button is going to involves the creation of a little javascript...I was able to find an button that did something sort of similar to the one I needed to create, and tweak that code.  I am no coding wizard by any means...


Plus, you came to the right place, in my experience, people are pretty helpful around here, and most of them know WAY more than I do...so hang tight!


Perhaps if you put a little bit more detail into your request for help, someone might be able to get you a little further down the road...i.e. - What data do you need loaded into which fields?  My button might ba able to be tweaked even!


That's called a dynamic URL button : have a search about this. you can have some examples ...


In short : something like this 





 00T/e -> Task edit page
the field Id -> you need to get it somewhere ( by using Firebug per exemple )

 And then the Value you want to fill in...






First of all thank for all the answers,


I successed to open a new task by button but now i want that the name of the account

will apper in the new task window - someone know how to do it ?


by the way this is line i wrote :


{! urlFor(  $Action.Task.NewTask )}



Just a quick question - why aren't you just using the Open Activities related list section and click on the New Task  button to create a new task? This would have automatically populate the task with the Account Name.

Well, specifically we are talking about Cases not tasks within cases.


We are still looking at how we handle Activities or Tasks withing those case records.


I see. We had similar requirements where we wanted to click on a button from the Account page to create a Case (of specific case record type, and pre-populated with certain values from Account field).
So we did it using URL as followed:





Note cas4 corresponds to the Account Name field in our Case page layout and  the other values (CF00N00000006qTDJ and 00N00000006qTDe) corresponds to the IDs of the specific fields in our Case that we wanted to extract values from the Account page into.  You can find out what are the appropriate IDs corresponding to each field in your Case page layout by either downloading the web developer tool or just click on the Page Source option of your browser (when you are editing your case) and then search for the Case field name in it and then search for the <input> tag there and then copy the text after name=


where do i find this "web developer tool" you reference for finding field ids?

We use firefox as our browser. So you can download this add-on via this link:





Note you can also just view the page source of the salesforce page directly and search for the name/id. See previous message.