# Adding/updating values under custom fileds

**URL:** <https://integration.keap.com/t/adding-updating-values-under-custom-fileds/85943>\
**Category:** API Q&A\
**Tags:** xml-rpc\
**Created:** [December 17, 2021, 4:30pm UTC](https://integration.keap.com/t/adding-updating-values-under-custom-fileds/85943 "2021-12-17T16:30:48Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![Shaik\_Hassna](https://avatars.discourse-cdn.com/v4/letter/s/a4c791/32.png) [@Shaik\_Hassna](https://integration.keap.com/u/Shaik_Hassna)\
**Post date:** [December 17, 2021, 4:30pm UTC](https://integration.keap.com/t/adding-updating-values-under-custom-fileds/85943/1 "2021-12-17T16:30:48Z")

</div>

Hi Team,  
I have created custom fields( [cr\_call\_type, cr\_newlead\_web, cr\_id through DataService.addCustomField but when i tried updating/adding the values under these custom fields i get [DatabaseError]Error updating custom field.

API: XML-RPC:  
[https://api.infusionsoft.com/crm/xmlrpc/v1](https://api.infusionsoft.com/crm/xmlrpc/v1)

Request:

\<?xml version='1.0' encoding='UTF-8'?\>

DataService.updateCustomField

```
<param>

  <value><string>KeapAK-REDACTED</string></value>

</param>

<param>

  <value><int>-1</int></value>

</param>

<param>

  <value><struct>

    <member><name>cr_call_type</name>

      <value><string>answered</string></value>

    </member>

  </struct></value>

</param>

```

Response:

\<?xml version="1.0" encoding="UTF-8"?\>

```
<fault>

    <value>

        <struct>

            <member>

                <name>faultCode</name>

                <value>

                    <i4>4</i4>

                </value>

            </member>

            <member>

                <name>faultString</name>

                <value>[DatabaseError]Error updating custom field</value>

            </member>

        </struct>

    </value>

</fault>

```

---

<div class="post-metadata">

**Author:** ![JustinGourley](https://sea1.discourse-cdn.com/flex019/user_avatar/integration.keap.com/justingourley/32/12672_2.png) [@JustinGourley](https://integration.keap.com/u/JustinGourley)\
**Post date:** [December 29, 2021, 5:41pm UTC](https://integration.keap.com/t/adding-updating-values-under-custom-fileds/85943/2 "2021-12-29T17:41:50Z")

</div>

Within your request body you have the custom field Id set as -1. This needs to be a valid (greater than 0) Id for the field you have previously created.

```auto
<param>
  <value><int>-1</int></value>
</param>

```

---

<div class="post-metadata">

**Author:** ![Shaik\_Hassna](https://avatars.discourse-cdn.com/v4/letter/s/a4c791/32.png) [@Shaik\_Hassna](https://integration.keap.com/u/Shaik_Hassna)\
**Post date:** [January 10, 2022, 2:47pm UTC](https://integration.keap.com/t/adding-updating-values-under-custom-fileds/85943/3 "2022-01-10T14:47:40Z")

</div>

Hi Justin,

I tried and could update the values under task(information tab) but could not update values for custom fields under (Tech) tab.

Here are the details.  
Endpoint: [https://api.infusionsoft.com/crm/xmlrpc/v1](https://api.infusionsoft.com/crm/xmlrpc/v1)

Request:

\<?xml version="1.0"?\>

```
<methodName>DataService.update</methodName>

<params>

    <param>

        <value>

            <string>KeapAK-REDACTED</string>

        </value>

    </param>

    <param>

        <value>

            <string>ContactAction</string>

        </value>

    </param>

    <param>

        <value>

            <int>96</int>

        </value>

    </param>

    <param>

        <value>

            <struct>

                <member>

                    <name>call_type</name>

                    <value>

                        <string>true</string>

                    </value>

                </member>

            </struct>

        </value>

    </param>

</params>

```

Response:

\<?xml version="1.0" encoding="UTF-8"?\>

```
<fault>

    <value>

        <struct>

            <member>

                <name>faultCode</name>

                <value>

                    <i4>10</i4>

                </value>

            </member>

            <member>

                <name>faultString</name>

                <value>[NoFieldFound]No field found: ContactAction.call_type</value>

            </member>

        </struct>

    </value>

</fault>

```

---

<div class="post-metadata">

**Author:** ![JustinGourley](https://sea1.discourse-cdn.com/flex019/user_avatar/integration.keap.com/justingourley/32/12672_2.png) [@JustinGourley](https://integration.keap.com/u/JustinGourley)\
**Post date:** [January 10, 2022, 6:18pm UTC](https://integration.keap.com/t/adding-updating-values-under-custom-fileds/85943/4 "2022-01-10T18:18:01Z")

</div>

Please always remove your API Key before posting code samples! It is important to keep your keys private.

- All custom field database names begin with an \_underscore when referenced in the xmlrpc API.
- Certain special characters used within the name of a field are never placed in the database name. If you named your field “call\_type”, its database name will be “calltype”.

It is likely your corrected xml will look something like:

```auto
<name>_calltype</name>

```

To find your database field names for custom fields there are a 2 ways:

Via the UI:  
Navigate to the page where you create your Task custom fields. At the very bottom of the page you will find the link “View the field database names (for the API)”

Via the API:  
GET /rest/v1/tasks/model/

I was able to update the text within a custom task field using this code:

```auto
<?xml version="1.0"?>
<methodCall>
    <methodName>DataService.update</methodName>
    <params>
        <param>
            <value>
                <string>REDACTED</string>
            </value>
        </param>
        <param>
            <value>
                <string>ContactAction</string>
            </value>
        </param>
        <param>
            <value>
                <int>187</int>
            </value>
        </param>
        <param>
            <value>
                <struct>
                    <member>
                        <name>_TextCustomField</name>
                        <value>
                            <string>Value you are updating to</string>
                        </value>
                    </member>
                </struct>
            </value>
        </param>
    </params>
</methodCall>

```

---

<div class="post-metadata">

**Author:** ![Shaik\_Hassna](https://avatars.discourse-cdn.com/v4/letter/s/a4c791/32.png) [@Shaik\_Hassna](https://integration.keap.com/u/Shaik_Hassna)\
**Post date:** [January 10, 2022, 7:25pm UTC](https://integration.keap.com/t/adding-updating-values-under-custom-fileds/85943/5 "2022-01-10T19:25:04Z")

</div>

Thanks Justin, That helped. Please help with the below too.

1. Any limitation on the number of custom fields to be created, i see few are not getting updated with values.
2. How should i updated yes or no for type yes/no. in the below example even though the response is 200 but not seeing the Yes selected.

PFB details.  
endpoint:  
[https://api.infusionsoft.com/crm/xmlrpc/v1](https://api.infusionsoft.com/crm/xmlrpc/v1)  
Request:

\<?xml version="1.0"?\>

```
<methodName>DataService.update</methodName>

<params>

    <param>

        <value>

            <string>KeapAK-</string>

        </value>

    </param>

    <param>

        <value>

            <string>ContactAction</string>

        </value>

    </param>

    <param>

        <value>

            <int>62</int>

        </value>

    </param>

    <param>

        <value>

            <struct>

                <member>

                    <name>_crnewleadcallrail</name>

                    <value>

                        <string>No</string>

                    </value>

                </member>

            </struct>

        </value>

    </param>

</params>

```

Response:

\<?xml version="1.0" encoding="UTF-8"?\>

```
<params>

    <param>

        <value>

            <i4>62</i4>

        </value>

    </param>

</params>

```

Thanks in advance.

---

<div class="post-metadata">

**Author:** ![JustinGourley](https://sea1.discourse-cdn.com/flex019/user_avatar/integration.keap.com/justingourley/32/12672_2.png) [@JustinGourley](https://integration.keap.com/u/JustinGourley)\
**Post date:** [January 10, 2022, 8:53pm UTC](https://integration.keap.com/t/adding-updating-values-under-custom-fileds/85943/6 "2022-01-10T20:53:39Z")

</div>

You are limited to creating 100 custom fields for each Object type. So 100 custom Contact fields, 100 custom Task fields, 100 custom Order fields, etc.

For updating a Yes/No field use 1 and 0 values.

Example to set Yes:

```auto
<?xml version="1.0"?>
<methodCall>
    <methodName>DataService.update</methodName>
    <params>
        <param>
            <value>
                <string>apiKey</string>
            </value>
        </param>
        <param>
            <value>
                <string>ContactAction</string>
            </value>
        </param>
        <param>
            <value>
                <int>187</int>
            </value>
        </param>
        <param>
            <value>
                <struct>
                    <member>
                        <name>_YesNoField</name>
                        <value>
                            <string>1</string>
                        </value>
                    </member>
                </struct>
            </value>
        </param>
    </params>
</methodCall>

```

---

<div class="post-metadata">

**Author:** ![Shaik\_Hassna](https://avatars.discourse-cdn.com/v4/letter/s/a4c791/32.png) [@Shaik\_Hassna](https://integration.keap.com/u/Shaik_Hassna)\
**Post date:** [January 25, 2022, 3:42pm UTC](https://integration.keap.com/t/adding-updating-values-under-custom-fileds/85943/7 "2022-01-25T15:42:34Z")

</div>

Hi Justin,  
Thanks for the support, could you please help me with the below.  
How do i get the values of the tab unders task.  
I have tech tab → and sever custom fields with values, so if i want to get the tech tab values from task is there a way?  
app id: [https://bio997.infusionsoft.com/](https://bio997.infusionsoft.com/)

thanks in advance

---

<div class="post-metadata">

**Author:** ![JustinGourley](https://sea1.discourse-cdn.com/flex019/user_avatar/integration.keap.com/justingourley/32/12672_2.png) [@JustinGourley](https://integration.keap.com/u/JustinGourley)\
**Post date:** [January 25, 2022, 4:24pm UTC](https://integration.keap.com/t/adding-updating-values-under-custom-fileds/85943/8 "2022-01-25T16:24:43Z")

</div>

Please clarify a bit…

Are you trying to get the name of the tabs, the name of the fields, or the value that is stored in the fields found on that tab?

---

<div class="post-metadata">

**Author:** ![Shaik\_Hassna](https://avatars.discourse-cdn.com/v4/letter/s/a4c791/32.png) [@Shaik\_Hassna](https://integration.keap.com/u/Shaik_Hassna)\
**Post date:** [January 25, 2022, 4:33pm UTC](https://integration.keap.com/t/adding-updating-values-under-custom-fileds/85943/9 "2022-01-25T16:33:23Z")

</div>

the values under the custom fields of tab(tech) under a task.  
request endpoint: [https://api.infusionsoft.com/crm/rest//tasks?since=022-01-25T00:17:59.039Z&until=2022-01-25T23:17:59.039Z&access\_token=o1Te1aneFuCg972KbeZXsh43Gt1N](https://api.infusionsoft.com/crm/rest//tasks?since=022-01-25T00:17:59.039Z&until=2022-01-25T23:17:59.039Z&access_token=o1Te1aneFuCg972KbeZXsh43Gt1N)

response:  
{

```
"tasks": [

    {

        "id": 132,

        "title": "physical test",

        "description": "physical test",

        "type": "Other",

        "priority": 3,

        "completed": false,

        "contact": {

            "id": 150,

            "email": null,

            "first_name": "RICHARD UNTEN",

            "last_name": ""

        },

        "url": "https://api.infusionsoft.com/crm/rest/v1/tasks/132",

        "due_date": "2022-01-03T18:30:00.000Z",

        "creation_date": "2022-01-25T14:59:06.000Z",

        "modification_date": "2022-01-25T14:59:53.000Z",

        "completion_date": null,

        "remind_time": null,

        "user_id": 30

    }

],

"count": 1,

"next": null,

"previous": null,

"sync_token": "MjAyMi0wMS0yNVQxMDo1ODoxOC4zMTMtMDU6MDA="

```

}

but the i dont see the values of custom tech tab of a task. PFA task tab snapshot.

 ![Task](https://us1.discourse-cdn.com/flex019/uploads/infusionsoft1/original/2X/b/b2bbb486d07151becc40c2a6e630094552e45d8e.png)

---

<div class="post-metadata">

**Author:** ![JustinGourley](https://sea1.discourse-cdn.com/flex019/user_avatar/integration.keap.com/justingourley/32/12672_2.png) [@JustinGourley](https://integration.keap.com/u/JustinGourley)\
**Post date:** [January 25, 2022, 9:58pm UTC](https://integration.keap.com/t/adding-updating-values-under-custom-fileds/85943/10 "2022-01-25T21:58:21Z")

</div>

You will need to leverage the XmlRpc API’s DataService in order to work with custom task (ContactAction) fields

---

<div class="post-metadata">

**Author:** ![Shaik\_Hassna](https://avatars.discourse-cdn.com/v4/letter/s/a4c791/32.png) [@Shaik\_Hassna](https://integration.keap.com/u/Shaik_Hassna)\
**Post date:** [January 26, 2022, 6:43am UTC](https://integration.keap.com/t/adding-updating-values-under-custom-fileds/85943/11 "2022-01-26T06:43:31Z")

</div>

Hi Justin,

Another thing noticed is when tried listing the tasks i could only fetch the tasks that i created from the Web UI and not the ones i created through the REST API not able to understand what is the difference between these two.

One difference i understood was the task created through REST API has custom fields also updated through contacActions but the one created from the webui does not allow me to add tech tab details.

Please clarify and also plz give me example to fetch all tasks and its custom fields values(Tech Tab), It would be great if you can connect via some zoom/google meet to see this live and advise. Please let me know if its fine so that i can share the meeting link with you over the email.

---

<div class="post-metadata">

**Author:** ![TomScott](https://sea1.discourse-cdn.com/flex019/user_avatar/integration.keap.com/tomscott/32/67_2.png) [@TomScott](https://integration.keap.com/u/TomScott)\
**Post date:** [January 31, 2022, 6:07am UTC](https://integration.keap.com/t/adding-updating-values-under-custom-fileds/85943/12 "2022-01-31T06:07:40Z")

</div>

Good evening Shaik,

We do not provide individual consultation with our engineering staff. If you are continuing to have issues, please file a ticket with our Support team, who can reach out to you directly.

[https://developer.infusionsoft.com/support/tickets/create/](https://developer.infusionsoft.com/support/tickets/create/)

---

<div class="post-metadata">

**Author:** ![john\_malshi](https://avatars.discourse-cdn.com/v4/letter/j/b487fb/32.png) [@john\_malshi](https://integration.keap.com/u/john_malshi)\
**Post date:** [February 11, 2022, 1:51pm UTC](https://integration.keap.com/t/adding-updating-values-under-custom-fileds/85943/13 "2022-02-11T13:51:22Z")

</div>

It was really informative. Thank you !!!

Regards,  
John Bowhunting Academy  
[https://huntingfellow.com/bow-hunting/](https://huntingfellow.com/bow-hunting/)
