Create / Update Row

Create a new row or update an existing row in a business object.

HTTP Request

Create:

PUT /icweb.dll/bo/{tableName}/{keyValue}?calculateValues={true|false}

Update:

POST /icweb.dll/bo/{tableName}/{keyValue}?calculateValues={true|false}

URI Parameters

Name In Required Type Description
tableName Path Yes String Table Name of the business object
keyValue Path Yes Integer For PUT (create) use 0, for POST (update) use the existing primary key value.
calculateValues Path No Boolean This can be used to disable returning calculated fields. By default this is true, if you supply false, then no calculated fields will be returned.

Request Body

This contains fields and values for the new/updated row. For simplicity, you should only include fields that have a value other than null. You should also exclude any non-stored field, as these will be ignored.

Name Type Description Optional Default
{fieldName} Any Should contain the new value for the specified field, see BusinessObjectField. Yes You can omit a field if the value is null.

Note

If a field has a default value, then if you want to set the value of that field to null, you must include the field in the request body with a null value. If you omit the field then the new row will have the default value inserted.

Responses

Name Type Description
200 OK TableData OK
403   An attempt was made to set a value for a read-only field.

Example

Request

PUT /icweb.dll/bo/Workpack/0

Request Body

{
        "Name": "2015 ROV Inspection",
        "Actual_Start": "2015-05-15T00:00:00.000Z",
        "Description": "Annual 2015 full field rov inspection",
        "ReadOnly": false,
        "Component_ID": 1
}

Response

{
        "rows": [{
                "Guid": "{35809A21-9174-4B56-AD5F-F3930DE24A2D}",
                "Workpack_ID": 1,
                "Name": "2015 ROV Inspection",
                "Actual_Start": "2015-05-15T00:00:00.000Z",
                "Description": "Annual 2015 full field rov inspection",
                "ReadOnly": false,
                "Task_Time": 0,
                "Hours_Per_Day": 12,
                "Estimated_Duration": 0,
                "Actual_End": "2015-05-15T00:00:00.000Z",
                "Total_Cost": 0,
                "Cost": 0,
                "Component_ID": 1,
                "Task_Count": 0
        }],
        "key": 136
}