Relate fields and subfields in sugar CRM

0

I have a SugarCRM Professional 8.0, in which I have the following modules: Quotes, Quotation Lines, and Places, with the following relationship logic.

  • Each quote may have n lines
  • Each quote line has only ONE Place

So far we have the relationship to bring data from the quote line

<?php

if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');


require_once('include/Sugarpdf/sugarpdf/sugarpdf.pdfmanager.php');


    class OpportunitiesSugarpdfPdfmanager extends SugarpdfPdfmanager
    {

        public function preDisplay()
        {
            parent::preDisplay();
            $this->getProducts();  
        }

        protected function getProducts() 
        {
            $this->bean->load_relationship('products');
            if($this->bean->products) {
                $products_list = $this->bean->products->getBeans();
                $map = $products->get_linked_beans('LUG1_Lugares','Lugar');
                $products = array();
                foreach ($products_list as $products) {   
                $mapField = PdfManagerHelper::parseBeanFields($map,true);
                $productFields = PdfManagerHelper::parseBeanFields($products, true);
                    $products[] = $productFields;
                }

                 $this->ss->assign('products', $products);
            }
        }
    }

However, the part of $ map is not working to bring us the map image of the Place module, and use $ products.LUG1_Lugares.mapaevento does not work either. Do you have any idea how you can exclusively bring a field image from a sub-sub level?

    
asked by Rodrigo Jimenez 04.06.2018 в 20:09
source

0 answers