dynamic data to the view and render it

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Abanoub
    Junior Member
    • Sep 2016
    • 23

    dynamic data to the view and render it

    what am trying to accomplish is when
    actionRead is being called to inject a field to be rendered on the detailed view , what am doing currently is
    Code:
     
     public function actionRead($params, $data, $request) {     $data['fields']['final_code'] = "test";     return parent::actionRead($params, $data, $request); }
    then clientDefs am adding:
    Code:
     
     {   "controller": "controllers/record",   "formDependency": {     "Final": {       "default": [         {           "action": "show",           "fields": ["final_code"]         }       ]     }   },   "boolFilterList": [     "onlyMy"   ] }
    apparently that's wrong , so what is the correct way of doing it?
    Last edited by Abanoub; 09-04-2016, 02:46 PM.
  • yuri
    Member
    • Mar 2014
    • 8485

    #2
    You need to create "notStorable" fIeld "finalCode" and then fill it $entity->set('finalCode', 'test');
    If you find EspoCRM good, we would greatly appreciate if you could give the project a star on GitHub. We believe our work truly deserves more recognition. Thanks.

    Comment

    Working...