# MruHeader

In API version 7.0 and later, the [`create()`](/docs/platform/api/guide/sforce-api-calls-create.md), [`update()`](/docs/platform/api/guide/sforce-api-calls-update.md), and [upsert()](/docs/platform/api/guide/sforce-api-calls-upsert.md) calls do not update the list of most recently used (MRU) items in the Recent Items section of the sidebar in the Salesforce user interface unless this header is used. Be advised that using this header to update the Recent Items list may negatively impact performance.

## API Calls

`create()`, [`merge()`](/docs/platform/api/guide/sforce-api-calls-merge.md), [`query()`](/docs/platform/api/guide/sforce-api-calls-query.md), [`retrieve()`](/docs/platform/api/guide/sforce-api-calls-retrieve.md), `update()`, `upsert()`

## Fields

### `updateMru`

**Type:** boolean

**Description:** Indicates whether to update the list of most recently used items (`true`) or not (`false`). For `retrieve()`, if the result has only one row, the MRU is updated to the ID of the retrieve result. For `query()`, if the result has only one row and the ID field is selected, the MRU is updated to the ID of the query result.

## Sample Code—Java

This sample turns on the MRU list update option by setting the `MruHeader` to `true`. Next, it creates an account.

```codesegment
public void mruHeaderSample() {
  connection.setMruHeader(true);
  Account account = new Account();
  account.setName("This will be in the MRU");
  try {
    SaveResult[] sr = connection.create(new SObject[]{account});
    System.out.println("ID of account added to MRU: " +
      sr[0].getId());
  } catch (ConnectionException ce) {
    ce.printStackTrace();
  }
}
```
