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
maytawnmaytawn 

Log a Call

I am trying to invoke the same functionality as the "Log a Call" button a custom Apex/Visualforce page that I am creating.  I need some guidance on how best to invoke this page pragmatically.

*werewolf**werewolf*

You'll need to say more than that.  Under what circumstance do you want this page to appear?

b-Forceb-Force

on Buton click

redirect to following page reference

/00T/e?title=Call&who_id=LOGGED_IN_UserID&what_id=CURRENT_RECORD_ID&followup=1&tsk5=Call&retURL=%2FCURRENT_RECORD_ID

 

It will open the create new task standard page

 

Thanks,

Bala

maytawnmaytawn

@Bala  Thank you very much.  This is exactly what I am looking for.  Could you direct me to some documention that details what the parameters are for and what other options may be possible?

*werewolf**werewolf*

You will not find any documentation about those parameters, as that is a URL hack.  URL hacks aren't officially supported by Salesforce.com, and those parameters may change at some point without notice, although in practice they usually do not change.

b-Forceb-Force

correct,

there is no any source for standard documentation for passing such parameters because it is not supported by salesforce.com  ******* they never get changed,

 

But we can set almost value for every field which  is available on edit page of  of the Task,

 

tricks to do so 

Open page in Mozila,(********* Install firebug addon to mozila).

open page in edit mode

click on button forms--->Display form details 

you can see all input fields with Id

just generate url &00N90000001AMuQ=yourFiledValue1&00N90000001AUUO=value2&....... so on 

 

Done 

 

 

Hope this will help you ,

 

Thanks,

Bala

 

newbie2010newbie2010

I have created the following code for a custom button to create a log a call record, but I am having a little trouble...

 

location.replace('/00T/e?title=Call&what_id={!Account.Id}&followup=1&tsk5=Meeting&retURL=%2F{!Account.Id}&tsk3={!Account.Name}&tsk10=Meeting&save=x');

 

This creates a log a call record that is a meeting type and has a subject of meeting.  This code relates the account where the button is located to the log a call record, but has an issue with any account name that has an apostrophe in it.  It sees the apostrophe in the account name as the end of the Javascript code and is expecting a parenthesis.  It works just fine with Account Names that do not have apostrophes.

 

Any suggestions on how to fix this would be greatly appreciated.

*werewolf**werewolf*

You'll want to URL encode the account name if you want it to work with things like parentheses or slashes.  See here.

 

Note that you'd probably be better off in the long term using the AJAX Toolkit to accomplish this task, rather than the URL hack.  As it stands, the save=x parameter no longer works for most orgs, and though it may be working for you now it may break someday soon.  That's the nature of URL hacks.

 

 

newbie2010newbie2010

The link wouldn't take me anywhere...

 

Do you have any suggestion on the AJAX development for this function?