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
AJ yorkshireAJ yorkshire 

Account custom field update

I have an S-Control that pulls in fields from account, to calculate an overall value. Everything is working fine except the returning the value calulated been inserted back into salesforce.
 
I have used document.write to show all my variables are correct. ready to be inserted back to the account.
 
However, I am haing trouble with how to send the value into the account 
 
Var AcctId; //the account id
I have the variable x //my calculated field
and the field name Total overall value; //field in account
 
I am looking for some help or explanation how to return the var x, into the field "Total overall value" of the accout "AcctID";
 
Any help would be most grateful.AJ
 
AJ yorkshireAJ yorkshire
I solved my problem in case anyone else was having trouble heres the result:
 
I declared updateObject and gave a value before this code: 
 
function update{
var newAcc = new Sforce.Dynabean("Account");
var AccArray = new Array(1);
newAcc.set("Id", accId);
newAcc.set("TotalOverallValue",updateObjects);
AccArray[0] = newAcc;

var cr = sforceClient.Update(AccArray);
Account = cr[0].id;
window.parent.parent.location.href = retUrl;
}