You need to sign in to do that
Don't have an account?

How can update a field here?
I'm trying update a checkbox on a custom object. However, when I call this from an s control I get blank window. Can anyone help here and tell me what I'm doing wrong?
<html>
<head>
<script src="https://www.salesforce.com/services/lib/ajax/beta3.3/sforceclient.js" type="text/javascript">
var url="/email/author/emailauthor.jsp?retURL=/{!Loan_ID}&template_id=00X40000000mepA&p2_lkid={!Contact_ID}&p3_lkid={!Loan_ID}";
function redirect( )
{
parent.frames.location.replace(url);
}
function updateSentEmail(){
qr = sforceClient.query("Select Id, Renewal_Email_Sent__c From Loan Where LoanId='{!Loan_ID}'");
alert("Here.");
var flds = sforceClient.DescribeSObject("loans").fieldList;
alert("Loan fields are:\n" + flds);
alert("Query"+qr.toString());
}
updateSentEmail();
//redirect( );
</script>
</head>
<body>
</body>
</html>
<html>
<head>
<script src="https://www.salesforce.com/services/lib/ajax/beta3.3/sforceclient.js" type="text/javascript">
var url="/email/author/emailauthor.jsp?retURL=/{!Loan_ID}&template_id=00X40000000mepA&p2_lkid={!Contact_ID}&p3_lkid={!Loan_ID}";
function redirect( )
{
parent.frames.location.replace(url);
}
function updateSentEmail(){
qr = sforceClient.query("Select Id, Renewal_Email_Sent__c From Loan Where LoanId='{!Loan_ID}'");
alert("Here.");
var flds = sforceClient.DescribeSObject("loans").fieldList;
alert("Loan fields are:\n" + flds);
alert("Query"+qr.toString());
}
updateSentEmail();
//redirect( );
</script>
</head>
<body>
</body>
</html>
First stopt multiposting tthe same question everywhere on the forum...it makes people nervous.
So first your var varibale is somewhat false as you must escape the differeent \ for your string to be valid.
If your page is blank you must have somewhat some javascript errors alert somewhere in the bottom of your browser window. Next I recomment you to use Firefox with the web developper extension and Firebug and then come with more info on you error.
Regards