0
私は、以前にサブミットされた正しいレコードを表示するために、編集フォーム(挿入フォームではない)のonAttachイベントでAMU.loadRecordByKey(widget)を呼び出します。ここでAMU.loadRecordByKey関数の実行後にフォームを左にシフト
は、Appメーカー大学のスクリプトライブラリから関数です:
/**
* Loads a record by Key
* Checks URL first and then uses page parameter RECORD_ID
* Use in the page onAttach, recommend a deticated datasource
* @param {Object} widget Should be the page
*/
AMU.loadRecordByKey = function(widget){
google.script.url.getLocation(function(location) {
var recordId = location.parameter.record_id;
var properties = app.pages[app.currentPage.name].properties;
if (recordId !== undefined && recordId !== null) {
widget.datasource.query.filters._key._equals = recordId;
}else if(properties.RECORD_ID !== null){
widget.datasource.query.filters._key._equals = properties.RECORD_ID;
}else{
// alert('No Record ID Found');
}
widget.datasource.load();
});
};
フォームが最初に、左にフォームに移行上のすべてを微そのディスプレイを開きますが、AMU関数が呼び出された直後になります。関数にエラーはありません(私はすべての行の間に警告を置いてテストしました)。
アイデア?
おかげで、あなたは命の恩人です。はい、手動保存モードボタンが有効になっている挿入フォーム用の新しいデータソースを作成しました。 –