You need to sign in to do that
Don't have an account?
chornbeck
Javascript won't trigger field update...
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
<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
chornbeck
Never mind, had the wrong Id...