• WigMan
  • NEWBIE
  • 0 Points
  • Member since 2008

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 0
    Replies
Trying to create a new task associated with a lead in an s-control and the code executes ok but it doesnt create the associated record in the task table...here is the code below - I also use the same method to add a note to a lead which works fine.

Code:
function UpdateTask() {
var addr = new sforce.StringBuffer();
var usr = "Lead sent-forwarded by: " + "{!User.Name}" + " to the following addresse(s): " + addr.append(document.getElementById("to_address").value);
var lead = "{!Lead.Id}";
var user = sforce.connection.getUserInfo().userEmail;

var updateTask = new sforce.SObject("Task");

updateTask.WhoId = lead;
updateTask.Subject = "Lead Sent-Forwarded";
updateTask.Description = usr;
updateTask.IsClosed = "true";
updateTask.Status = "Completed";
updateTask.Type = "Email";
updateTask.Priority = "Normal";

var result = sforce.connection.create([UpdateTask]);
}

 

  • April 25, 2008
  • Like
  • 0
Ok so this might be a rookie question, but I have a small s-control i wrote that pulls data on leads into a simple page that I want to do two things to.

1. Add a button that will pull up the content of the page and allow the user to forward as a email though outlook.

2. I want to be able to unhide or make visible on the window that lauched ("open in new window" setting on the button) the menubars and tool bars. Currently it opens in a new/pop-up window without any of these so the user can select fuctions from the toolbar like print.

Thx

JW
  • March 24, 2008
  • Like
  • 0