Skip to main content
This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.
A simple question. In my code
A customer has many partners. If I want to get customer details and a customer have how many partners. What I trying to do is,
$customer = Customer::get();
return Partners::get()->filter('CustomerID', $customer->ID);
Unfortunately above code is not working for me, Is there any easy way to get.?
this->Partners(); should return all partners; but i am not sure .
$customer = DataObject::get_by_id('Customer', $customer_id);