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
KrawlsKrawls 

Need Help creating a customized BASIC button

Hello,

I am VERY new at the programming side of SFDC.  I need to create a new button on the Task area that reads "New Note."  We have to be able to report on our note/history and so as an organization we have to log our notes under Activities.  Our organization requires very basic and specific processes or they will not be comprehended, so I need to create this new custom button on the activities list.

What I would like this button to do, is open an activity and also pre-populate the subject line, with "Case/Note History."

Does anyone know the process/code for creating this button? 

Not sure if this is possible, but if the button also pulled up the Task page and it was able to be programmed to just show certain fields that would be AWESOME!!!!!  We currently track different things in our Tasks Activities and for the group of people that I work with, if when they clicked on "New Note" it would customize what fields appeared, it would be amazing.

Thanks!!!!!!



devNut!devNut!
I assume you want a new button to appear on the task related list (e.g. if you scroll down on an account detail page to the open activities seciton)

Now if you log into sfdc and click any NEW TASK button take a look at the URL in the browser and it should look something like this:  https://na2.salesforce.com/00T/e?retURL=%2Fhome%2Fhome.jsp  (this link is from clicking NEW TASK on the home tab)

A trick is that you can pass in values through the URL to pre-populate values on the create screen, for example:
https://na2.salesforce.com/00T/e?retURL=%2Fhome%2Fhome.jsp&tsk5=1213123


You can create an Activity custom button (setup - customize - activities - task buttons and links)
Type: list button
Behaviour: in existing window with sidebar
Content Source: URL
Content: https://na2.salesforce.com/00T/e?retURL=%2Fhome%2Fhome.jsp&tsk5=1213123

You may have to add the button to the related list e.g. the account page layout


KrawlsKrawls
Hi -

Thank you for responding!!!

I tried your instructions, but when I went to test the button and save the task it refreshes me to the home screen.  Additionally, when I then go back to the contact where I tested it, the task was not logged.

Also, is there a way to program the button so only certain feilds are available in the screen and feilds are pre-populated? Meaning, the only items availalbe in the task screen for this button would be:
  • Assigned To:
  • Subject: Programmed to say: "Case Note/History"
  • Due Date (today) 
  • Related To
  • Name: Programmed to be: Completed
  • Status
  • Priority
  • Comments:
We have a lot more fields that are include in the Task/Activity form because we track various items in this list, so if the fields could be minimized based off the behaviour of the button, it would be less of a process nightmare.  I know the above isnt so basic, but thought i would put it out there to see if it is possible, and then if you had any suggestions for programming it.

Thank you,
devNut!devNut!
1) refreshes me to the home screen
This is due to the value of the return URL:

https://na2.salesforce.com/00T/e?retURL=%2Fhome%2Fhome.jsp&tsk5=1213123

Since activities appear in multiple places i dont think you can use a merge field (e.g. {!account_id} ).  That means you'd likely have write an s-control that would set the retURL value properly and load the URL it in the current window


1) is there a way to program the button so only certain feilds are available in the screen and feilds are pre-populated?
You can use record types to show different pages.  You'd have to try passing in a record type id to see if it is accepted.
KrawlsKrawls
ok, this is sounding way over my head - ugh!

Is there a place you suggest looking for S-controls for Dummies?  The word even freaks me out :)  and since the S-control freaks me out, the 2nd question is even more over my head.

I've tried the tutorials, but they are very generic....