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

getNamedValues not working in v_1.4

Accepted answer
44
Views
4
Comments
edited Jan 19, 2019 3:47PM in Integrations and APIs 4 comments

Summary

ApplicationContext is not set for the request : getNamedValues

Content

Hi All,

I am trying to fetch get all the menu values of a drop down. But I get this error:

ApplicationContext is not set for the request : getNamedValues

Do I need to include anything in my PHP code?

~VIP

Version

18C

Code Snippet

<?php
	require_once(get_cfg_var("doc_root") . "/ConnectPHP/Connect_init.php");
	use RightNow\Connect\v1_4 as RNCPHP;
	initConnectAPI("api_user","Pass1234");
?>

<?php
	try
	{
		$menu = RNCPHP\ConnectAPI::getNamedValues("RightNow\\Connect\\v1_4\\CO\\PotentialStage");
		echo "<pre>";
		print_r($menu);		
	}
	catch(Exception $ex)
	{
		echo $ex->getMessage();
	}
?>
Tagged:

Howdy, Stranger!

Log In

To view full details, sign in.

Register

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