<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://sugarclub.sugarcrm.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Custom Module Popup Picker fails</title><link>https://sugarclub.sugarcrm.com/dev-club/f/questions-answers/1591/custom-module-popup-picker-fails</link><description>Hello everyone, I&amp;#39;m hoping someone has run into this issue and can help us get on the right track. I&amp;#39;ve got a custom module that is working great (Module A). I am trying to add a secondary custom module that is related to the first (Module B). It is very</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Custom Module Popup Picker fails</title><link>https://sugarclub.sugarcrm.com/thread/6459?ContentTypeID=1</link><pubDate>Wed, 01 May 2019 20:04:21 GMT</pubDate><guid isPermaLink="false">5c521d64-519d-47a6-9065-134618b211bf:26170384-031c-42a5-9b80-87e55e47ea5d</guid><dc:creator>Jon Sheppard</dc:creator><description>&lt;p&gt;In case anyone comes across this, I was able to find that we needed a file inside of the custom module directory: /modules/ModuleB/metadata/popupdefs.php&amp;nbsp;&lt;/p&gt;&lt;p&gt;Once that file is added, Sugar knows how to display the module for Search and Selects on Reports. Weird to me that it was not needed for the relate field, however. Either way, this is cleared up.&amp;nbsp;&lt;/p&gt;&lt;p&gt;Here is our quick example for that popupdefs that got us working:&amp;nbsp;&lt;/p&gt;&lt;blockquote class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;p&gt;&lt;em&gt;&lt;strong&gt;$module_name = &amp;#39;ModuleB&amp;#39;;&lt;/strong&gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;strong&gt;$object_name = &amp;#39;MODULEB&amp;#39;;&lt;/strong&gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;strong&gt;$popupMeta = array(&lt;/strong&gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;strong&gt; &amp;#39;moduleMain&amp;#39; =&amp;gt; $module_name,&lt;/strong&gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;strong&gt; &amp;#39;varName&amp;#39; =&amp;gt; $object_name,&lt;/strong&gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;strong&gt; &amp;#39;searchInputs&amp;#39;=&amp;gt; array( &lt;/strong&gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;strong&gt; 0 =&amp;gt; &amp;#39;name&amp;#39;, &lt;/strong&gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;strong&gt; ),&lt;/strong&gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;strong&gt; &amp;#39;searchdefs&amp;#39; =&amp;gt; array (&lt;/strong&gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;strong&gt; &amp;#39;name&amp;#39; =&amp;gt; array (&lt;/strong&gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;strong&gt; &amp;#39;name&amp;#39; =&amp;gt; &amp;#39;name&amp;#39;,&lt;/strong&gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;strong&gt; &amp;#39;width&amp;#39; =&amp;gt; &amp;#39;100%&amp;#39;,&lt;/strong&gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;strong&gt; ),&lt;/strong&gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;strong&gt; ),&lt;/strong&gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;strong&gt; &amp;#39;listviewdefs&amp;#39; =&amp;gt; array (&lt;/strong&gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;strong&gt; &amp;#39;NAME&amp;#39; =&amp;gt; &lt;/strong&gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;strong&gt; array (&lt;/strong&gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;strong&gt; &amp;#39;width&amp;#39; =&amp;gt; &amp;#39;100%&amp;#39;,&lt;/strong&gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;strong&gt; &amp;#39;label&amp;#39; =&amp;gt; &amp;#39;LBL_LIST_NAME&amp;#39;,&lt;/strong&gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;strong&gt; &amp;#39;link&amp;#39; =&amp;gt; true,&lt;/strong&gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;strong&gt; &amp;#39;default&amp;#39; =&amp;gt; true,&lt;/strong&gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;strong&gt; &amp;#39;name&amp;#39; =&amp;gt; &amp;#39;name&amp;#39;,&lt;/strong&gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;strong&gt; ),&lt;/strong&gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;strong&gt; ),&lt;/strong&gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;strong&gt;);&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;&lt;/blockquote&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>