• vtkstef
  • NEWBIE
  • 0 Points
  • Member since 2008

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 5
    Replies
Hi,

I am constructing a URL with the merge variable $Action.Activity.NewTask, so that when I click it, a new task page is displayed.

I would like to pre-fill as many fields as possibles, by setting field values as URL parameters.

I know about what_id= and who_id= but I could not find other fields that could be explicitly named as a parameter (Subject for example). I scoured the discussion forums and I have found people using <input id=##########  number to successfully set other fields (for example in my custom object, the From field has an <input> id of 00N70000002Fuyw so if I want to prefill 'From' field with the value of foo I send this URL: https://na5.salesforce.com/a02/e?retURL=%2Fa02%2Fo&00N70000002Fuyw=foo

Is there a merge valrable that can get me these ids? Or is there any metadata I could query to get these form field id's? Or am I to inspect the html itself to discover such Id's (as I did in my example above)?

Ciao
Stefano
 
I need to pre-default the Related To field in tasks and events to the Contact's Account Id.

It's working when I've overridden 'New Task' and 'New Event', however when I try much the same thing with the 'Log a call' and 'Send an Email' functions my s-control has an error.

Successful s-control for overriding 'New Task' making use of URLFOR functionality.
Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<script type="text/javascript" src="/js/functions.js"></script>
<script src="/soap/ajax/13.0/connection.js"></script>
<script type="text/javascript" >
function redirectToRecord() {
var newURL = "{!URLFOR($Action.Task.NewTask, null, [who_id=Contact.Id, what_id=Account.Id, retURL=URLFOR($Action.Contact.View, Contact.Id)], true)}";
parent.frames.location.replace(newURL);
}
</script>
</head>
<body onload="redirectToRecord();">
</body>
</html>

Unsuccessful s-control for overriding 'Log a Call' making use of URLFOR functionality.
Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<script type="text/javascript" src="/js/functions.js"></script>
<script src="/soap/ajax/13.0/connection.js"></script>
<script type="text/javascript" >
function redirectToRecord() {
var newURL = "{!URLFOR($Action.Activity.LogCall, null, [who_id=Contact.Id, what_id=Account.Id, retURL=URLFOR($Action.Contact.View, Contact.Id)], true)}";
parent.frames.location.replace(newURL);
}
</script>
</head>
<body onload="redirectToRecord();">
</body>
</html>

This causes the s-control to run twice? and the browser URL ends up with an error: https://cs2.salesforce.com/servlet/servlet.Integration?lid=01NR00000004SFO&ic=1#Error! that seems to thankfully prevent it from looping infinitely.

Any suggestions about what I should try?

Note: the Send an Email s-control is almost the same as above but with the different action of course.


Message Edited by manu on 08-13-2008 04:05 PM

Message Edited by manu on 08-13-2008 04:05 PM
Hello,

I am trying to get two-way SSL authentication working between Salesforce and my Tomcat server so I can send encrypted web service calls from Salesforce.  One way works just fine.  However, when I try using the Client Certificate that I downloaded from Setup > App Setup > Develop > API, it gets rejected with a "bad_certificate" IO Exception because Salesforce's certificate expired in 2004 (!!).  I'm not the only one having this problem (see http://community.salesforce.com/sforce/board/message?board.id=general_development&view=by_date_ascending&message.id=19703)  Does anyone know where the new certificate is?
  • July 22, 2008
  • Like
  • 0