• chornbeck
  • NEWBIE
  • 0 Points
  • Member since 2007

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 1
    Replies
Here's the script I'm using (I put this together from the toolkit docs and what I've seen in this forum) - It obviously doesn't work, or I wouldn't be asking for help :)

<html>
  <head>
  <script src="/soap/ajax/9.0/connection.js"
          type="text/javascript"></script>
<script type="text/javascript">

 function initPage() {

var mylead = new sforce.SObject("Lead");

mylead.Id = "00N50000001SCnZ";

mylead.Times_Called__c == {!Lead.Times_Called__c} + 1;

sforce.connection.update([mylead]);

}

</script>


</head>

<body onLoad="initPage();">

</body>
</html>


If it's not obvious what I'm trying to do...  I have a custom field, "Times_Called" that I need to increment by 1 each time this s-control is invoked (the s-control will be a SkypeOut call, and I would like to count the number of calls made to each lead...)

Any help is GREATLY appreciated...

Chris
I have an S-control (in this case, it enacts a SkypeOut phone call for the lead...) that I would like to trigger a field update on user click.

I have a custom field named Times_Called that I need to increment by +1 each time the s-control button is pressed, thereby tracking the number of times the lead has been called.

Also, a little fancier, but each time the s-control button is pressed, I need it to be disabled for 8 hours afterwards (to give the user only "fresh" leads..)


If anyone can shed any light on either of these topics, it would be greatly appreciated!


Here's the script I'm using (I put this together from the toolkit docs and what I've seen in this forum) - It obviously doesn't work, or I wouldn't be asking for help :)

<html>
  <head>
  <script src="/soap/ajax/9.0/connection.js"
          type="text/javascript"></script>
<script type="text/javascript">

 function initPage() {

var mylead = new sforce.SObject("Lead");

mylead.Id = "00N50000001SCnZ";

mylead.Times_Called__c == {!Lead.Times_Called__c} + 1;

sforce.connection.update([mylead]);

}

</script>


</head>

<body onLoad="initPage();">

</body>
</html>


If it's not obvious what I'm trying to do...  I have a custom field, "Times_Called" that I need to increment by 1 each time this s-control is invoked (the s-control will be a SkypeOut call, and I would like to count the number of calls made to each lead...)

Any help is GREATLY appreciated...

Chris