You need to sign in to do that
Don't have an account?
NM
var Invoice = new sforce.SObject("Invoice_Object__c");
Invoice.Id= "{!Invoice_Object__c.Id}";
Invoice.Name= "{!Invoice_Object__c.Name}";
Invoice.Amount__c= "{!Invoice_Object__c.Amount__c}";
record update using s-control
Hello,
I'm trying to update a field by s-control and then use the printAnything application. It doesn't work. It looks like it stops in the update request. The code is:
*****************************************************************************************************************
<script type="text/javascript" src="/soap/ajax/9.0/connection.js" > </script>
<script language=javascript>
<script language=javascript>
var Invoice = new sforce.SObject("Invoice_Object__c");
Invoice.Id= "{!Invoice_Object__c.Id}";
Invoice.Name= "{!Invoice_Object__c.Name}";
Invoice.Amount__c= "{!Invoice_Object__c.Amount__c}";
if(sforce.connection.update([Invoice])[0].getBoolean("success"))
{
window.parent.location.href="{!URLFOR(
$SControl.PRINTANY__PrintAnythingDriver,Event.Id,
[packageId="InvoiceLines", invoiceId=Invoice_Object__c.Id, debug="1"])}";
}
else
{
alert("Problem Updating");
}
</script>
{
window.parent.location.href="{!URLFOR(
$SControl.PRINTANY__PrintAnythingDriver,Event.Id,
[packageId="InvoiceLines", invoiceId=Invoice_Object__c.Id, debug="1"])}";
}
else
{
alert("Problem Updating");
}
</script>
*****************************************************************************************************************
I hope someone has an idea...
Thank you.
CaptainObvious
You didn't actually make the request to update in your code...
The following line is just waiting for the results of the update:
if(sforce.connection.update([Invoice])[0].getBoolean("success"))