# useExecuteRequestCallback

Lightweight callback wrapper around `useExecuteRequest`.

Returns a stable async function that executes the provided config **without triggering loading/data/error state updates**.

Useful for:

* Passing execution callbacks to components (e.g. search, autocomplete, tables)
* Dynamic parameter execution
* One-off requests where local state management is not needed

Internally:

* Forces `autoExecute = false`
* Disables debounce and polling
* Delegates execution to `useExecuteRequest`

## Installation

```tsx
import { useExecuteRequestCallback } from 'uxp/components';
```

## Signature

```tsx
function useExecuteRequestCallback(config: ExecuteConfig, options?: Omit<UseExecuteOptions<T>, 'debounbce' | 'autoExecute' | 'polling'>): (param?: any) => Promise<ExecutionResult<T>>
```

## Examples

```tsx
// Callback-style execution (recommended for ObjectSearchComponent)
const getLocations = useExecuteRequestCallback(
  LocationServices.getAll({ page: 1, pageSize: 50 })
);

const result = await getLocations({ query: 'Colombo' });
return result.data || [];
```

## Related Types

* [ExecuteConfig](https://help.iviva.com/uxp/v5/additional-resources/types/executeconfig)
* [ExecuteActionConfig](https://help.iviva.com/uxp/v5/additional-resources/types/executeactionconfig)
* [ExecuteConfigBase](https://help.iviva.com/uxp/v5/additional-resources/types/executeconfigbase)
* [ExecutionOptions](https://help.iviva.com/uxp/v5/additional-resources/types/executionoptions)
* [CachingOptions](https://help.iviva.com/uxp/v5/additional-resources/types/cachingoptions)
* [ExecuteServiceConfig](https://help.iviva.com/uxp/v5/additional-resources/types/executeserviceconfig)
* [ExecuteMicroserviceConfig](https://help.iviva.com/uxp/v5/additional-resources/types/executemicroserviceconfig)
* [ExecuteAPIConfig](https://help.iviva.com/uxp/v5/additional-resources/types/executeapiconfig)
* [ExecuteQueryConfig](https://help.iviva.com/uxp/v5/additional-resources/types/executequeryconfig)
* [QueryParams](https://help.iviva.com/uxp/v5/additional-resources/types/queryparams)
* [ExecuteCollectionConfig](https://help.iviva.com/uxp/v5/additional-resources/types/executecollectionconfig)
