You need to sign in to do that
Don't have an account?
alivepjc
AJAX update contract status
Hi,
I need to update the status of a contract, but I don't quite understand how it works.
There's the ContractStatus table and the Contract table with Status field and StatusCode field. I am using AJAX.
//--------------------------------------------------------
var contract_object_update = new DynaBean("Contract");
contract_object_update.set("Id",Contract_id);
contract_object_update.set("StatusCode","???"); // ?
contract_object_update.set("Status","???"); // ?
Contract_to_Update.push(contract_object_update);
var sr = sforceClient.Update(Contract_to_Update)[0];
//---------------------------------------------------------
Thanks!
I need to update the status of a contract, but I don't quite understand how it works.
There's the ContractStatus table and the Contract table with Status field and StatusCode field. I am using AJAX.
//--------------------------------------------------------
var contract_object_update = new DynaBean("Contract");
contract_object_update.set("Id",Contract_id);
contract_object_update.set("StatusCode","???"); // ?
contract_object_update.set("Status","???"); // ?
Contract_to_Update.push(contract_object_update);
var sr = sforceClient.Update(Contract_to_Update)[0];
//---------------------------------------------------------
Thanks!
when you create a new approval request, the staus of the contract will be updated.
[... populage a new contract object ..]
var saveResult = sforceClient.Create([newContract]); // create new contract
var newRecordID = saveResult[0].id;
var newApproval = new Sforce.Dynabean("Approval"); // move into the "review" stage by adding an approval
newApproval.set("ParentId",newRecordID);
newApproval.set("Status","Pending");
var saveResult = sforceClient.Create([newApproval]);
now, you can see the contract stage has been updated by the act of adding an approval request.