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
fraserfraser 

Frontdoor - passing multiple arguments

Hi, 

I would like to open a window to salesforce that directs me to a new call task.

I find that I cannot prepolutate more than one field. The only field that prepopulates itself is the first argument I provide in the string.

"/secur/frontdoor.jsp?sid=loginResult.sessionId&retURL=/00T/e?tsk5=Call&followup=1"

Can you tell me how to get multiple fields to prepopulate?

Much appreciation, thanks

 

EnderEnder
Fraiser,

You want to pass the argument to the 00T/e page, but you are passing it to frontdoor.jsp.

The way your current URL parses is as such:

target = /secur/frontdoor.jsp
parameter1 = sid=loginResult.sessionId
parameter2 = retURL=/00T/e?tsk5=Call
parameter3 = followup=1

What you want to do is URL escape the second ampersand, so that it passes to the correct page. The URL you want is as follows:

/secur/frontdoor.jsp?sid=loginResult.sessionId&retURL=/00T/e?tsk5=Call%26followup=1

which parses as:

target = /secur/frontdoor.jsp
parameter1 = sid=loginResult.sessionId
parameter2 = retURL=/00T/e?tsk5=Call%26followup=1

Cheers,

Lexi
darozdaroz
Ender,

I'm pretty sure to be HTML compliant that ? in the retURL parameter should be escaped as well.
EnderEnder
Doesn't hurt, but after the first ? IE and Firefox will parse any other ? normally.

However, I'm too lazy to look at the spec, to know if this is just a by product of the way they coded it
darozdaroz
True... There was some browser I found some time ago that choked on those -- Opera mabye? Might have been Konquerer tho... /shrug.

Definately in the spec tho.
anagramanagram
This looks like a great solution to a problem I have as well. But the question is... how do I know what field name (e.g. tsk5) goes with what task field.

It looks like the task Subject is always tsk5, no matter what the layout or field order. But what about the other fields, custom fields, etc. Is there a way to programmatically determine the field name (id) mapping?

Thanks!
Nicholas
DevAngelDevAngel

Hi anagram,

Bottom line is that, no, there is not programatic way to determine this.  Probably won't be, but you never know.

You can easily identify the form field names though using Firefox and the web developer plugin.

Message Edited by DevAngel on 06-22-2005 10:14 AM

anagramanagram
Hi Dave-
Thanks for clarifying!

I was afraid of that, but in doing more research it seems that the basic fixed task fields (Subject, Assigned To, Due Date, etc) are always the same form id (e.g. 'tsk5', 'tsk1', 'tsk4') and that custom fields use their own id as their form id (e.g '00N30000000oMny'). This seems to be the case regardless of form layout order.

How likely is it that this scheme will stay in place? Vague question I know, but any sense would be helpful.

Thanks!
Nicholas
DevAngelDevAngel

Hi anagram,

We reserve the right to change that scheme at any time, so beware.  This is not an api or a published or promoted use.  Having said that, unless we have a really major re-implementation of the site, I think you are pretty safe.

anagramanagram
Thanks Dave! Sounds sensible. We'll probably go ahead and just watch out for changes.

For the future, it would be nice to have this formalized for applications such as browser helper objects and automatic form fillers.

Thanks again,
Nicholas