I am trying to use portals to get some records from the database however when I try and echo the portal value its empty.
But when I Check the size of the portal set it has a valid number.
$rec = $result->getRecords();
//since the above will only return one customer lets make an array and fill that array with portal results down below
$customer_projects = array();
foreach ($rec as $customer)
//since this result will only return one user lets get the portal records
$customer_projects = $customer->getRelatedSet('M4 Projects');
foreach ($customer_projects as $project)
$project_name = $project->getField('M4 Projects::Project Name');
when I print the project_name I dont get any result or errors on the error log
can anyone help.