<?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>Usage of other primary keys than SugarCRM GUIFD</title><link>https://sugarclub.sugarcrm.com/dev-club/f/questions-answers/5582/usage-of-other-primary-keys-than-sugarcrm-guifd</link><description>Good Morning, I have an ongoing discussion with some of my colleagues regarding the usage of the standard GUID SugarCRM uses as the Primary Key of records. 
 We are all new to SugarCRM and I managed anyway to get all CRM data from our old system into</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Usage of other primary keys than SugarCRM GUIFD</title><link>https://sugarclub.sugarcrm.com/thread/26312?ContentTypeID=1</link><pubDate>Tue, 19 Apr 2022 15:40:18 GMT</pubDate><guid isPermaLink="false">5c521d64-519d-47a6-9065-134618b211bf:ed8e1690-9ccd-4cca-8c76-2e21c4f23008</guid><dc:creator>Michael Malich</dc:creator><description>&lt;p&gt;Hi Rafael,&lt;/p&gt;
&lt;p&gt;thanks a lot for your reply and I will check the &amp;quot;sync key&amp;quot; functionality you mentioned.&lt;br /&gt;But it looks like it &amp;quot;only&amp;quot; updates records and can&amp;#39;t be used for what I&amp;#39;m looking for.&lt;br /&gt;But seems to be very helpful for interfaces.&lt;br /&gt;&lt;br /&gt;But I&amp;#39;m not talking about an interface. I&amp;#39;m talking about a one time data migration.&lt;br /&gt;All the tables I&amp;#39;m migrating have relations with others and have foreign keys for these relations.&lt;br /&gt;As soon as I do not use the PK of these records as the ID in SugarCRM, I have to read for example the ID of an account before I import the contacts belonging to that account. Because I don&amp;#39;t know the ID SugarCRM has created for the account.&lt;br /&gt;This has to be done for every One2Many&amp;nbsp;relation and for each Many2Many relations too.&lt;br /&gt;Feels like a big overhead for migrating an application into SugarCRM.&lt;br /&gt;&lt;br /&gt;Also regarding the usage of the GUID I would like to show you what is written in the Sugar Developer Documentation.&lt;/p&gt;
&lt;p&gt;&lt;a title="https://support.sugarcrm.com/documentation/sugar_developer/sugar_developer_guide_10.0/data_framework/database" href="https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_10.0/Data_Framework/Database" rel="noopener noreferrer" target="_blank"&gt;https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_10.0/Data_Framework/Database&lt;/a&gt;&lt;span&gt;/&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;There is described that it is possible to use other PK formats and the GUID is not mandatory.&lt;br /&gt;There is also described what&amp;#39;s important to use a different format.&lt;br /&gt;&lt;br /&gt;I&amp;#39;m new to SugarCRM and I appreciate recommendations but I can&amp;#39;t imagine why using a different UNIQUE key should ever make any problems. I&amp;#39;ve migrated databases into other CRMs in the past and had never problems like this. Only if you don&amp;#39;t take care and have maybe ID conflicts in the future.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Sorry for the detailed reply, but I would like to really understand it in best case based on real problems you heard about.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Thanks&lt;br /&gt;Michael&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Usage of other primary keys than SugarCRM GUIFD</title><link>https://sugarclub.sugarcrm.com/thread/26310?ContentTypeID=1</link><pubDate>Tue, 19 Apr 2022 13:24:02 GMT</pubDate><guid isPermaLink="false">5c521d64-519d-47a6-9065-134618b211bf:41a825b5-cac2-4597-a3c1-4f1e725e3d49</guid><dc:creator>Rafael Fernandes</dc:creator><description>&lt;p&gt;Hi &lt;a href="/members/michaelmalich328086"&gt;Michael Malich&lt;/a&gt;,&lt;/p&gt;
&lt;p&gt;I wouldn&amp;#39;t recommend updating PKs other than our out-of-the-box structure, you might run into issues on upgrades, addons and&amp;nbsp;any other Sugar code that might rely on that GUID structure, in other words, try to avoid this approach.&lt;/p&gt;
&lt;p&gt;We do, however, have a mechanism built for this type of scenarios which is to use&amp;nbsp;&amp;quot;sync_key&amp;quot; to sync up your data from external (old system) to Sugar. We use it internally for our integration purposes and that&amp;#39;s our recommended approach to you.&lt;/p&gt;
&lt;p&gt;&amp;quot;sync_key&amp;quot;&amp;nbsp;field&amp;nbsp;is available on every single Sugar module and is used to:&lt;/p&gt;
&lt;p&gt;- &lt;a href="https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_11.3/Integration/Web_Services/REST_API/Endpoints/modulesync_keysync_key_field_value_PUT/"&gt;Speed up integrations&lt;/a&gt; (our recommended approach for upserts into sugar)&lt;/p&gt;
&lt;p&gt;- Retrieve your &amp;quot;external system&amp;quot; record by using it&amp;#39;s own ID.&lt;/p&gt;
&lt;p&gt;Give it a shot and let us know.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Usage of other primary keys than SugarCRM GUIFD</title><link>https://sugarclub.sugarcrm.com/thread/26308?ContentTypeID=1</link><pubDate>Tue, 19 Apr 2022 11:20:47 GMT</pubDate><guid isPermaLink="false">5c521d64-519d-47a6-9065-134618b211bf:8985b172-3694-4e0a-9e05-e8d18f9faef8</guid><dc:creator>Michael Malich</dc:creator><description>&lt;p&gt;Hi Jeroen,&lt;br /&gt;Thanks a lot for your reply. I&amp;#39;m happy to hear that I&amp;#39;m not the only one with that opion :-)&lt;/p&gt;
&lt;p&gt;We already have a customized field with the old legacy_id for each record.&lt;br /&gt;This first data migration doesn&amp;#39;t contain a lot of data from only a few tables.&lt;br /&gt;I&amp;#39;ve used the GUI interface import and used for example for contacts the company name to link a contact One2Many. That works well as long as you have no Many2Many links. But we have that between Opps and Contacts.&lt;br /&gt;So I used the Sugar API to read the necessary data and to import the Many2many link. That works well but it&amp;#39;s a lot of additional work one can save by using legacy IDs as SugarCRM IDs.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Usage of other primary keys than SugarCRM GUIFD</title><link>https://sugarclub.sugarcrm.com/thread/26307?ContentTypeID=1</link><pubDate>Tue, 19 Apr 2022 10:36:27 GMT</pubDate><guid isPermaLink="false">5c521d64-519d-47a6-9065-134618b211bf:dd56cffa-6a18-42e4-9dbf-0d5e1793a1a5</guid><dc:creator>Jeroen Somhorst</dc:creator><description>&lt;p&gt;Hi Michael,&lt;/p&gt;
&lt;p&gt;from a technical standpoint, and my experience as a SugarCRM developer, there is no issue with using any other format as a PK as long as it is unique. As you already said yourself the only thing you need to be sure of is that the custom format doesn&amp;#39;t conflict in any way with the default Guid format in Sugar. And as long as that isn&amp;#39;t the case there is no issue. Sugar doesn&amp;#39;t really care about the format in my experience.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;But if you had the chance of importing the data again and without using the custom format as PK I would try to do so. To be able to find the data based on the old pk&amp;#39;s you could add a extra field to store this value.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>