saveConfigRecord

Saves a record for a config

  1. configName - name of the app config

  2. record - a record structure Json object (as it comes from loadConfigRecordById)

Example Usages

Simple:

let record = await brixxApi.loadConfigRecordById("myConfig", 1);
record.data.Name = "John Doe";
brixxApi.saveConfigRecord("myConfig", record);

Create a new record:

brixxApi.saveConfigRecord("myConfig", {
    data: {
        myFirstName: "John",
        myLastName: "Doe"
    }
});

Create a new record and use the result:

let newRecord = brixxApi.saveConfigRecord("myConfig", {
    data: {
        myFirstName: "John",
        myLastName: "Doe"
    }
});
console.log("New Record Id:" + newRecord.data.id);

Last updated