RemoteObjectsのUpdate処理を試してみました。
最初に宣言するのはapex:remoteObjectsタグです。Fieldは"Id"だけ宣言しておけば処理が実行できました。SELECTで取得する必要がなければ宣言しなくても大丈夫みたいです。
<apex:remoteObjects > <apex:remoteObjectModel name="Account" fields="Id" /> </apex:remoteObjects>
こんな感じで実行できました。
<script type="text/javascript"> function updateAccount(prmAccountId, prmAccontName) { var accountName = document.getElementById(prmAccontName).value; var account = new SObjectModel.Account(); account.set('Id', prmAccountId); account.set('Name', accountName); account.update(function(err, results, event) { if (err) { alert(err.message); } else { console.log(results); } }); return false; } </script>
実行時のログはこんな感じでした。