<?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>BeanFactory::getBean not returning existing record in SugarCRM custom code</title><link>https://sugarclub.sugarcrm.com/dev-club/f/questions-answers/5636/beanfactory-getbean-not-returning-existing-record-in-sugarcrm-custom-code</link><description>I have a SugarCRM integration. It has the following line in the code 
 $beanToSync = BeanFactory::getBean($moduleToCheck, $beanToSync-&amp;gt;id); 
 In $moduleToCheck the module &amp;#39;Leads&amp;#39; is passed and $beanToSync-&amp;gt;id have an ID of an existing Lead in SUgarCRM</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: BeanFactory::getBean not returning existing record in SugarCRM custom code</title><link>https://sugarclub.sugarcrm.com/thread/26517?ContentTypeID=1</link><pubDate>Wed, 18 May 2022 16:52:02 GMT</pubDate><guid isPermaLink="false">5c521d64-519d-47a6-9065-134618b211bf:d89d90d8-87ca-4177-8e95-a29f53432e4b</guid><dc:creator>Umar Qayyum</dc:creator><description>&lt;p&gt;Yes, the user have permission to view that record and the record is not marked for deletion&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BeanFactory::getBean not returning existing record in SugarCRM custom code</title><link>https://sugarclub.sugarcrm.com/thread/26508?ContentTypeID=1</link><pubDate>Tue, 17 May 2022 19:39:22 GMT</pubDate><guid isPermaLink="false">5c521d64-519d-47a6-9065-134618b211bf:9c4851f4-e3d1-46fe-b33b-9aa311879135</guid><dc:creator>Andr&amp;#233; Lopes</dc:creator><description>&lt;p&gt;Try this approach:&lt;/p&gt;
&lt;p&gt;&lt;span&gt;$beanToSync = BeanFactory::getBean($moduleToCheck, $beanToSync-&amp;gt;id, ['disable_row_level_security' =&amp;gt; true]);&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BeanFactory::getBean not returning existing record in SugarCRM custom code</title><link>https://sugarclub.sugarcrm.com/thread/26507?ContentTypeID=1</link><pubDate>Tue, 17 May 2022 19:39:00 GMT</pubDate><guid isPermaLink="false">5c521d64-519d-47a6-9065-134618b211bf:3a73fad3-11b9-45be-a127-2149265e21c3</guid><dc:creator>Jeff Bickart</dc:creator><description>&lt;p&gt;&lt;a href="/members/umarqayyum327968"&gt;Umar Qayyum&lt;/a&gt; : Without more details, it is tough to diagnose.&amp;nbsp;Whom is the user running the function&amp;nbsp;&lt;span&gt;BeanFactory::getBean($moduleToCheck, $beanToSync-&amp;gt;id)? Does this user have permission to view this record? In other words, are they on a team or a member of a role that prevents access? Is the record marked for deletion? delete = 1?&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>