SOLVED

Custom Object 2.0 Rest API Lead Link problem

Go to solution
Anonymous
Not applicable

Custom Object 2.0 Rest API Lead Link problem


Hello,

I'm trying to insert a new entry in our custom object created before custom objects 2.0 months ago, but get an error:

"result": [

    {

        "seq": 0,

        "status": "skipped",

        "reasons": [

            {

            "code": "1004",

            "message": "Lead not found"

            }

        ]

        }

    ],

"success": true

I have a link field "LeadID" and the id is set correctly, I've tried other leads and i get the same error. My interpretation is that on insert i can't because the API can't find the lead that exists. As an aside, our lead object doesn't have a "LeadID" we have the old "id," is it related? From the API Describe Lead:

{

    "id": 39,

    "displayName": "Id",

    "dataType": "integer",

        "soap": {

        "name": "Id",

        "readOnly": false

    },

    "rest": {

        "name": "id",

        "readOnly": false

    }

},

We currently have no data, but have campaigns on this object, would it be easier to completely rebuild it using the Custom Objects 2.0?

Relevant details for my problem:

  1. We have a custom object created months ago before custom objects 2.0
  2. I added fields using the new custom 2.0 object interface
  3. There's no data, so rebuilding it is an option
Tags (2)
1 ACCEPTED SOLUTION

Accepted Solutions
Kenny_Elkington
Marketo Employee

Re: Custom Object 2.0 Rest API Lead Link problem

Possibly, you would need to open a support ticket to find out for sure.  If a newly provisioned object works for you and you don't have any existing data in the old table, then I would suggest moving on from it, though.

View solution in original post

6 REPLIES 6
Kenny_Elkington
Marketo Employee

Re: Custom Object 2.0 Rest API Lead Link problem

Could you provide the result for your object from List Custom Objects and an example of you input so we can have a better idea of what we're looking at?

Anonymous
Not applicable

Re: Custom Object 2.0 Rest API Lead Link problem

"result": [

    {

        "name": "Deal",

        "displayName": "Deal",

        "description": "Deal",

        "createdAt": "2015-05-04T23:36:49Z",

        "updatedAt": "2015-05-04T23:36:50Z",

        "idField": "marketoGUID",

        "dedupeFields": [

            "LeadID",

            "PersonID"

            ],

        "searchableFields": [

            [

                "LeadID",

                "PersonID"

            ],

            [

                "marketoGUID"

            ],

            [

                "LeadID"

            ]

        ],

            "relationships": [

            {

                "field": "LeadID",

                "type": "child",

                "relatedTo": {

                    "name": "Lead",

                    "field": "LeadID"

                }

            }

        ]

    }

],

"success": true

request for input:

{

    "action": "createOnly",

    "input": [

        {

        "pd_personid": null,

        "LeadID": 397069,

        "PersonID": 397069,

        "PFL_MKP_RID": 128917,

        "PFL_AccountOwner": "Mike Robinson",

        "PFL_CSC_RID": 224427,

        "PFL_INC_RID": null,

        "pd_wontime": null,

        "pd_losttime": null,

        "pd_beginningpipeline": "TestPipeline2",

        "pd_closetime": null,

        "pd_lostreason": null,

        "PFL_DateEnteredStage": "2015-09-25T15:53:05.330Z",

        "pd_dealcreated": "2015-09-25T15:53:05.330Z",

        "PD_DealStatus": "open",

        "pd_dealvalue": 0,

        "pd_isdeleted": false,

        "PD_StageID": 10,

        "PD_Stage": "Stage2",

        "PD_PipelineID": 3,

        "PD_Pipeline": "TestPipeline2",

        "PD_LastActivityDate": null,

        "PD_DealID": 342,

        "PD_Deal": "Bluewolf Deal TEST"

        }

    ]

}

Kenny_Elkington
Marketo Employee

Re: Custom Object 2.0 Rest API Lead Link problem

This first question may be silly but: Are you certain there's a lead with ID 397069 in the destination instance?

Second question, what does Describe shows as the field types for LeadID and PersonID?

Anonymous
Not applicable

Re: Custom Object 2.0 Rest API Lead Link problem

yes the person exists! haha

I think the problem is that the deal object points to "leadid" but we don't have an actual "leadid" in the lead object, we have "id."

I've created a whole new custom object mapped to lead id, "id," and it works. is it possible to modify link fields on a custom object?

Kenny_Elkington
Marketo Employee

Re: Custom Object 2.0 Rest API Lead Link problem

Possibly, you would need to open a support ticket to find out for sure.  If a newly provisioned object works for you and you don't have any existing data in the old table, then I would suggest moving on from it, though.

Anonymous
Not applicable

Re: Custom Object 2.0 Rest API Lead Link problem

Thanks! we've decided to create a whole new object and migrate any campaigns to the new object.