# saveConfigRecord

1. configName - name of the app config
2. record - a record structure Json object (as it comes from loadConfigRecordById)

### Example Usages

Simple:

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

\
Create a new record:

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

Create a new record and use the result:

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


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://brixxbox.gitbook.io/brixxbox-documentation/client-api-reference/functions/saveconfigrecord.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
