# loadAndDisplayRecordById

Loads a record, based on the value in the control, given as a parameter in the first argument and displays it. This function just combines [loadRecordById](https://gebra-it.gitbook.io/wiki/client-api-reference/functions/loadrecordbyid) and displayRecord [displayRecord](https://gebra-it.gitbook.io/wiki/client-api-reference/functions/displayrecord)

## Example Usages

Simple (pay attention to the **await** keyword)

```javascript
let recordId = 123;
app.loadAndDisplayRecordById(recordId);

await app.loadAndDisplayRecordById(recordId);
```

### Return Values

The loadAndDisplayRecordById function returns a promise that resolves to the loaded record. The return type is a promise, and the resolved value of the promise is the loaded record. If the record cannot be loaded, the promise will resolve to null.
