Let's Reconnect, thank you for making 2022 our best year yet.

Look Back
Setting a Menu Value in Connect for PHP — Cloud Customer Connect
You're almost there! Please answer a few more questions for access to the Applications content. Complete registration
Interested in joining? Complete your registration by providing Areas of Interest here. Register

Setting a Menu Value in Connect for PHP

Accepted answer
edited Jun 13, 2022 4:10AM in General Technical Discussions 3 comments


This is making me crazy, but I don't seem to be able to set a value on a menu field in a custom object using CPHP. On a test site, I built a custom object called "Animal" with two fields: "Name" is a string, and "Sound" is a menu with the values "Moo" (0), "Oink" (1), "Woof" (2). (See attached code block.) I cannot set either

$animal->Sound->ID = 2;


$animal->Sound->LookupName = 'Woof';

Because I get an error similar to "Connect error: 1, Not Allowed: read-only; AnimalSounds.ID" Buuut...I'm pretty sure I'm following the example in the documentation found on this page

Howdy, Stranger!

Log In

To view full details, sign in.


Don't have an account? Click here to get started!