saveConfigRecord
Saves a record for a config
configName - name of the app config
record - a record structure Json object (as it comes from loadConfigRecordById)
Example Usages
Simple:
let record = await app.loadConfigRecordById("myConfig", 1);
record.data.Name = "John Doe";
app.saveConfigRecord("myConfig", record);
Create a new record:
app.saveConfigRecord("myConfig", {
data: {
myFirstName: "John",
myLastName: "Doe",
},
});
Create a new record and use the result:
let newRecord = app.saveConfigRecord("myConfig", {
data: {
myFirstName: "John",
myLastName: "Doe",
},
});
console.log("New Record Id:" + newRecord.data.id);
Return Values
The saveConfigRecord function returns a Promise that resolves to the result of saving the configuration record.
Last updated
Was this helpful?