Oracle RightNow getNamedValues, get all possible values for answer Object attributes, re-making the console

$fields = array(“AccessLevels”, “AnswerType”,”Language”, “StatusWithType.Status”, “Categories”, “Products”);
foreach($fields as $key => $field){
$temp = array();
$$field = array();
$parameter = RNCPHP\ConnectAPI::getNamedValues(“RightNow\\Connect\\v1_2\\Answer”, $field);
foreach($parameter as $key => $value){
$temp[$value->ID] = $value->LookupName;
}
$$field = $temp;
if($field == ‘StatusWithType.Status’){ $StatusWithType = $temp; }
}
// Prove it
foreach($StatusWithType as $key => $value){ echo $key . “, ” . $value . “<br />”; }

// Now fill in the answer creation/edit form values with these values

Leave a Reply

You must be logged in to post a comment.