Is there a way to use the sugar popup (or any built in popup class for that matter) where I can just pass in a module & record ID and have it display the data? I just want to display a pop-up with *just* the data from a relate field.
3Likes Is there a way to use the sugar popup (or any built in popup class for that matter) where I can just pass in a module & record ID and have it display the data? I just want to display a pop-up with *just* the data from a relate field.
Yes sugar supporst that.
Try to find out inside include/javascript/.... folder a file named DCMenu.js.
This class already have a method to present a record in detail/edit views into a build-in sugar popup.
This file exists on sugar PRO, on CE I haven't sure.
Rafael Queiroz Gonçalves
Advanced OMG UML Certified Professional
Sun Certified Enterprise Architect for the Java Platform
Sun Certified Programmer for the Java 2 Platform
IBM Certified Advanced Application Developer - Lotus Notes and Domino
IBM Certified Application Developer - IBM WebSphere Portlet Factory
Computer Science Mastering / UFSC - PPGCC
Here's the code that got it working for my "Realtor's" module. This code is in the parent module that displays the Realtor relate field in editviewdefs.php
Code:array ( 'name' => 'realtor_c', 'customCode' => '<a href="javascript:DCMenu.miniDetailView(\'{$fields.realtor_c.module}\',\'{$fields.con_realtors_id_c.value}\');">{$fields.realtor_c.value}</a>', 'studio' => 'visible', 'label' => 'LBL_REALTOR', ),
Very good. The DCMenu object also can be used to present a div or an external page as a popup into sugar, and always using a nice layout according sugar theme.
Rafael Queiroz Gonçalves
Advanced OMG UML Certified Professional
Sun Certified Enterprise Architect for the Java Platform
Sun Certified Programmer for the Java 2 Platform
IBM Certified Advanced Application Developer - Lotus Notes and Domino
IBM Certified Application Developer - IBM WebSphere Portlet Factory
Computer Science Mastering / UFSC - PPGCC
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks