---
title: "Global Fields"
description: "Global Fields"
url: "https://www.contentstack.com/docs/developers/sdks/content-delivery-sdk/java/reference/global-fields"
product: "Contentstack"
doc_type: "guide"
audience:
  - developers
  - admins
version: "current"
last_updated: "2026-09-06"
---

# Global Fields

## Global Fields

A [Global field](/docs/headless-cms/about-global-field/) is a reusable field (or group of fields) that you can define once and reuse in any content type within your stack. This eliminates the need (and thereby time and efforts) to create the same set of fields repeatedly in multiple content types.

## fetch

The fetch method retrieves the global field data of the specified global field.

```
Example:

import com.contentstack.sdk.*;

Stack stack = Contentstack.stack(apiKey, deliveryToken, environment);
GlobalField globalField = stack.globalField("globalfields_uid");
        globalField.fetch(new GlobalFieldsCallback() {
            @Override
            public void onCompletion(GlobalFieldsModel model, Error error) {
                JSONArray resp = model.getResultArray();
                Assertions.assertTrue(resp.isEmpty());
            }
        });
```

## findAll

The findAll method retrieves all the global fields of the stack.

```
Example:
GlobalField globalField = stack.globalField();
        globalField.findAll(new GlobalFieldsCallback() {
            @Override
            public void onCompletion(GlobalFieldsModel globalFieldsModel, Error error) {
                assertTrue(globalFieldsModel.getResultArray() instanceof JSONArray);
                assertNotNull(((JSONArray) globalFieldsModel.getResponse()).length());
            }
        });
```

## includeBranch

The includeBranch method includes the branch details in the result for single or multiple global fields.

```
Example:
import com.contentstack.sdk.*;

Stack stack = Contentstack.stack(apiKey, deliveryToken, environment);
GlobalField globalField = stack.globalField().includeBranch();
```

## includeGlobalFieldSchema

The includeGlobalFieldSchema method includes the schema of the global field in the response.

```
Example:
import com.contentstack.sdk.*;

Stack stack = Contentstack.stack(apiKey, deliveryToken, environment);
GlobalField globalField = stack.globalField().includeGlobalFieldSchema();

Note: 
  
    All users can retrieve information about Global fields, regardless of their role or access level.
    If a Global field includes nested Global fields, the API response will return them as part of the overall schema.
```

## Global Fields | Java Delivery SDK | Contentstack

Global Fields are reusable fields you define once and reuse across content types in the Java Delivery SDK, saving repeated field setup.