---
title: Update
slug: netsuite/_5qx-update
description: Learn about the latest feature in its beta testing phase and discover how to get your questions answered by reaching out to our reliable support team. Explore this document for a comprehensive understanding of the new feature and ensure a smooth user expe
docTags: 
createdAt: 2021-10-29T09:59:46.000Z
---

The following is an example of updating an Item where we are changing some of the fields. (See [Item](docId\:uwAJNF0ExXeYGtmSe4uVE) for all available fields). The NetSuite Item Id (internalId) and Item Type (itemType) are required to update the item.

:::hint{type="info"}
Note: Breadwinner supports multiple item updates in one request, but it is still in the beta stage.
:::

The response returns the complete Item information, but we have shortened the response in our example for ease of reading.&#x20;

Pass skipDML as true in the request to skip the DML operation in Salesforce.

:::CodeblockTabs
Request

```apex
Map<String, Object> nsItem = new Map<String, Object>();
    nsItem.put('internalId', '7718');
    nsItem.put('itemType', 'nonInventorySaleItem');
    nsItem.put('displayname', 'Leather Jacket');
    nsItem.put('location', new Map<String, Object>{'internalId'=>'10'});
    nsItem.put('salesDescription', 'Black Color Leather Jacket');

    // Initializing the Item Custom Fields
    List<Object> itemCustomFieldList = new List<Object>();
    Map<String, Object> itemCustomField = new Map<String, Object>();
        itemCustomField.put('fieldType', 'select');
        itemCustomField.put('scriptId', 'custitem_category');
        itemCustomField.put('valueLookup', new Map<String, Object>{'internalId'=>'2'});
        itemCustomFieldList.add(itemCustomField);
    Map<String, Object> itemCustomField1 = new Map<String, Object>();
        itemCustomField1.put('fieldType', 'boolean');
        itemCustomField1.put('scriptId', 'custitem_available');
        itemCustomField1.put('value','true');
        itemCustomFieldList.add(itemCustomField1);

    // Adding the Item Custom Fields
    nsItem.put('customFieldList', new Map<String, Object>{'customField'=>itemCustomFieldList});

Map<String, Object> requestJSONMap = new Map<String, Object>();
    requestJSONMap.put('items', new List<Object>{nsItem});
    String reqJSON = JSON.serialize(requestJSONMap);

Map<String, Object> reqObj = new Map<String, Object>();
    reqObj.put('version', '1.0');
    reqObj.put('action', 'updateItem');
    reqObj.put('skipDML', false);
    reqObj.put('requestJSON', reqJSON);

//  Placing a request to Breadwinner Global API
Map<String, Object> resp = breadwinner_ns.BreadwinnerNetSuiteAPI.call(reqObj);
System.debug(resp);
```

Response

```json
{
  action=updateItem,
  timestamp=1606829457729,
  validRequest=true,
  version=1.0,
  responseJSON={
    "status": "200",
    "errors": [],
    "items": [
      {
        "useMarginalRates": false,
        "unitsType": null,
        "taxSchedule": {
          "name": "Default Tax-Schedule",
          "internalId": "1"
        },
        "subsidiaryList": {
          "recordRef": [
            {
              "type": null,
              "name": "Parent Company",
              "internalId": "1",
              "externalId": null
            }
          ]
        },
        "shippingCost": null,
        "salesforceID": "a082w0000072U8hAAE",
        "salesDescription": "Black Color Leather Jacket",
        "rate": null,
        "quantityPricingSchedule": null,
        "purchaseDescription": null,
        "pricingMatrix": null,
        "pricingGroup": null,
        "preferredLocation": null,
        "parent": null,
        "overallQuantityPricingType": "_byLineQuantity",
        "minimumQuantity": null,
        "memberList": null,
        "maximumQuantity": null,
        "matrixType": null,
        "locationsList": null,
        "location": {
            "name": "New York",
            "internalId": "10"
          },
        "lastModifiedDate": 1606829455,
        "itemType": "NonInventorySaleItem",
        "itemId": "Leather Jacket",
        "isInactive": false,
        "internalId": "7718",
        "incomeAccount": {
          "type": null,
          "name": "Sales",
          "internalId": "54",
          "externalId": null
        },
        "includeChildren": true,
        "handlingCost": null,
        "externalId": null,
        "expenseAccount": {
          "type": null,
          "name": "Expenses",
          "internalId": "58",
          "externalId": null
        },
        "displayName": null,
        "description": null,
        "department": null,
        "customForm": {
          "type": null,
          "name": "Custom Non-Inventory Part Form",
          "internalId": "5",
          "externalId": null
        },
        "customFieldList": {
          "customField": [
            {
              "valueLookup": {
                "type": null,
                "name": "Retailer",
                "internalId": "2",
                "externalId": null
              },
              "value": null,
              "scriptId": "custitem_category",
              "internalId": "457",
              "fieldType": null
            },
            {
              "valueLookup": null,
              "value": "true",
              "scriptId": "custitem_available",
              "internalId": "250",
              "fieldType": null
            }
          ]
        },
        "currencyValue": "1",
        "createdDate": 1606829455,
        "cost": null,
        "cogsAccount": null,
        "classification": null,
        "assetAccount": null,
        "account": null
      }
    ]
  }
}
```
:::

