We'd love to hear from you! Provide  feedback  to earn a badge today. Take our quick survey
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

PHP Update Menu With Lookup that Contains Numbers

Received Response
edited Jun 20, 2016 2:42PM in Integrations and APIs 4 comments


I have a bit of PHP that updates a custom menu field on a custom object. I've got it working for one menu, but I can't get another to work because my menu contains numbers, and it's treating the numbers as if they were the IDs of the menu items, rather than the labels. Here's an example:

        $CustObj->CustField = new \RightNow\Connect\v1_2\CustObjMenu\CustMenu();
        $CustObj->CustField = \RightNow\Connect\v1_2\CustObjMenu\CustMenu::fetch($value);

Where my menu contains the values 1, 2, and 3, and $fetch is the lookup to set the menu to. I get an error where $value is 3, because it thinks I'm giving it a menu ID rather than a lookup, and there is no item ID 3. 

Howdy, Stranger!

Log In

To view full details, sign in.


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