function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
FinTechFinTech 

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>
The_FoxThe_Fox
Hello,

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
FinTechFinTech
Sorry about that. Was hoping that I could get it answered because it never did. I'll take a look at your code. Thanks!