Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
corebosCP : custom module show all records
#1
Hi,

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?

rgds
Reply
#2
I created a ticket and did some testing:

<!-- m --><a class="postlink" href="http://corebos.org/development/view.php?id=280">http://corebos.org/development/view.php?id=280</a><!-- m -->

try that and let me know how it goes.
Joe
TSolucio
Reply
#3
Hi,

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

module Points :
id
Name
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
Reply
#4
I think it should work the same. Please try to get the SQL to see if it is constructing it correctly.
Joe
TSolucio
Reply
#5
Found it

in VTActiveResource.php
function defaultScope :

add the condition in the switch

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

it does not construct the condition automatically using the field definition (ex : if uipte =10 and reltabid = 6) ==> $fieldname ==> ...
Reply
#6
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
Joe
TSolucio
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)