You need to sign in to do that
Don't have an account?
BobU
My first S-control doesn't work - older API
I'm trying to add a function to an existing S-control that will count the number of times a form is printed from a custom object.
...
<script src="https://www.salesforce.com/services/lib/ajax/beta3.3/sforceclient.js" type="text/javascript"></script>
...
function incrementCounter()
{
var count = {!Progress_Note_v2__c.Number_of_times_Printed__c};
++count;
var update = new Sforce.Dynabean("Progress_Note_v2__c");
update.set("Id", "{!Progress_Note_v2__c.Id}");
update.set("Progress_Note_v2__c.Number_of_times_Printed__c", "count");
var saved = sforceClient.Update(update);
}
Thanks in advance
You should be able to use the old beta Ajax toolkit and it should work just fine, but the new one is much easier to code in and use.