kintone.plugin.app.getConfig always return {} in app.record.edit.submit event

when i use kintone.plugin.app.getConfig(PLUGIN_ID) in config page it return object i save with kintone.plugin.app.setConfig(object) but in app.record.edit.submit event it return {}
code :
in desktop.js
import {PLUGIN_ID} from "../utils/constants";
kintone.events.on('app.record.edit.submit', async (event) => {
const config = kintone.plugin.app.getConfig(PLUGIN_ID);
console.log(config) //{}
await handleAddOrUpdateKintoneRecord(event);
return event;
});

in config.js
const config = kintone.plugin.app.getConfig(PLUGIN_ID);
console.log(config) // return normal

i find out that i need to click update the app to reflect the change on config page. thanks

4 Likes