---
title: "Asset related objects for generic Groovy script post function"
canonical: "https://support.appfire.com/space/AIP/10256687/Asset%20related%20objects%20for%20generic%20Groovy%20script%20post%20function"
format: markdown
---
> Macro (aura-html)

This document explains how to access information about asset custom fields within a generic Groovy script post function used in workflows. The generic post function injects the issue's asset custom fields to the post function context as `List<AssetCustomFieldAndValue>` with the name `assetCustomFieldAndValueList`**. **

### AssetCustomFieldAndValue

Represents one custom field and values.

| **Class field** | **Description** |
| --- | --- |
| `assetCustomField` | See `AssetCustomField` class on this page below. |
| `assetList` | Gives assets of a custom field of the current transition. Its type is `List<JipInventory>`. |
| `originalAssetList` | Gives assets of a custom field before transition. Its type is `List<JipInventory>`. |

```java
package inventoryplugin.workflow.function.genericscript.dto;

import inventoryplugin.entity.JipInventory;
import java.util.List;

public class AssetCustomFieldAndValue {

    AssetCustomField assetCustomField;
    List<JipInventory> assetList;
    List<JipInventory> originalAssetList;

    public AssetCustomField getAssetCustomField() {
        return assetCustomField;
    }

    public void setAssetCustomField(AssetCustomField assetCustomField) {
        this.assetCustomField = assetCustomField;
    }

    public List<JipInventory> getAssetList() {
        return assetList;
    }

    public void setAssetList(List<JipInventory> assetList) {
        this.assetList = assetList;
    }

    public List<JipInventory> getOriginalAssetList() {
        return originalAssetList;
    }

    public void setOriginalAssetList(List<JipInventory> originalAssetList) {
        this.originalAssetList = originalAssetList;
    }
}



```

### AssetCustomField

Holds simple information of the asset custom field.

| **Class field** | **Description** |
| --- | --- |
| `id` | Numeric custom field ID. For example, `11002`<span style="color: #222222">.</span> |
| `customFieldId` | String version of custom field ID. For example, `customfield_11002` |
| `fieldName` | <span style="color: #222222">Original name of the field.</span> |
| `translatedFieldName` | <span style="color: #222222">Translated name of the custom field. It is translated by the current user language preferences.</span> |

```java
package inventoryplugin.workflow.function.genericscript.dto;


import com.atlassian.jira.issue.fields.CustomField;

public class AssetCustomField {

    private Long id;
    private String customFieldId;
    private String fieldName;
    private String translatedFieldName;

    public AssetCustomField() {
    }

    public AssetCustomField(CustomField customField) {
        this.id = customField.getIdAsLong();
        this.customFieldId = customField.getId();
        this.fieldName = customField.getUntranslatedName();
        this.translatedFieldName = customField.getFieldName();
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getCustomFieldId() {
        return customFieldId;
    }

    public void setCustomFieldId(String customFieldId) {
        this.customFieldId = customFieldId;
    }

    public String getFieldName() {
        return fieldName;
    }

    public void setFieldName(String fieldName) {
        this.fieldName = fieldName;
    }

    public String getTranslatedFieldName() {
        return translatedFieldName;
    }

    public void setTranslatedFieldName(String translatedFieldName) {
        this.translatedFieldName = translatedFieldName;
    }
}

```