Community
Showing results for 
Search instead for 
Do you mean 
Reply

Adding a record to a custom table

Highlighted
Silver Super Contributor
Posts: 2,342
Country: USA

Adding a record to a custom table

[ Edited ]

Does anyone have adding a record to a custom table working using the web API?  If so could you post the body of a successful post?  When I try and add a record it gives me the following message.  I suspect that if it is working that I'm not formatting the company that I'm attempting to associate the custom entities record with properly.

 

Here is the body of the post I'm using:

 

{
"insurer": "Axa",
"policy Number": "12345",
"private": false,
"companies": ["id": "e39e2d40-694b-4c83-a5ef-0cbb23d0459c"],
"contacts": null,
"groups": null,
"opportunities": null,
}

 

It doesn't seem to matter if I fill in the rest of the fields on not.  I retrieved the fields using the API and I'm certain that the company id is correct.

 

Here is the response from Act!:

 

{
  "message""The request is invalid.",
  "modelState": {
    "relationships": [
      "At least one of these (Companies, Contacts, Groups, or Opportunities) requires an item"
    ]
  }
}
 
Thanks!
 
Stan

If you would like to get more out of ACT! you can find an ACT! Certified Consultant near you by going to:www.act.com/acc.
-------------------------------------------------------------------------------------
Stan Smith
ACT! Certified Consultant
ADS Programming Services, Inc.
(205) 222-1661
www.adsprogramming.com
www.actwebhosting.com
Click Here to Purchase Act!
Highlighted
Silver Super Contributor
Posts: 2,342
Country: USA

Re: Adding a record to a custom table

I got it working!  😁


If you would like to get more out of ACT! you can find an ACT! Certified Consultant near you by going to:www.act.com/acc.
-------------------------------------------------------------------------------------
Stan Smith
ACT! Certified Consultant
ADS Programming Services, Inc.
(205) 222-1661
www.adsprogramming.com
www.actwebhosting.com
Click Here to Purchase Act!
Highlighted
Bronze Super Contributor
Posts: 1,284
Country: USA

Re: Adding a record to a custom table

Stan,

What was wrong with your initial code?

 

-- Jim 

Highlighted
Copper Contributor
Posts: 209
Country: Netherlands

Re: Adding a record to a custom table

Yeah indeed, i'd like to know too!

Greetings,

ACT Certified Consultants
TendenZ
the Netherlands