Full Version: corebosCP : custom module show all records
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

i have created a custom module with field link (uitype =10) to organisations

however, in the CP, i see all records although they are not related to the logged contact

any ideas to debug?

I created a ticket and did some testing:

<!-- m --><a class="postlink" href=""></a><!-- m -->

try that and let me know how it goes.

it's a custom module - not the existing one which works

module Points :
accountid --> uitype 10 related to Organisations

when i enable the Module Points in CP , i see all records but it should be filtered to only accountid

i'll try to debug it
I think it should work the same. Please try to get the SQL to see if it is constructing it correctly.
Found it

in VTActiveResource.php
function defaultScope :

add the condition in the switch

case 'Points': //MSL
$condition = array('condition'=>"accountid='".Yii::app()->user->accountId."'");

it does not construct the condition automatically using the field definition (ex : if uipte =10 and reltabid = 6) ==> $fieldname ==> ...
I was tempted to tell you to add that but since you were capturing accounts I thought the switch would be applying the "Accounts" entry.

Glad you got it working. I will see if we can make this part of the application more generic