Can I view the SugarCRM "record ID Number" within the customer module. 

Can I view the Sugar record ID Number within the customer/account module, ideally in the system properties tab? We have a lot of records (150,000+) in our database and have found many duplicates. In an attempt to try to avoid duplicates from importing from our billing system I was thinking of having sales reps enter the Sugar record number on their contract so during import the systems would match this number up first instead of creating a duplicate record. Is this possible without exporting the records? And how would I get this record number visible from within any of the modules? 

Thanks! 

  • Hi Katie DelValle,

    I understand this request in terms of including the ID in the import file so it checks for and does not create records with those duplicate IDs.

    In the pursuit of getting this information for that import file, you have asked about displaying the ID number in the record. I think I am missing a step in this approach, though, because you mentioned wanting to avoid exporting, which means it is unclear how the ID number information displayed in the record is going to get from the screen into the import file.

    Keep in mind a few things:

    1. Import only looks for record ID when it checks for duplicates. It would require a custom coded solution to check a different field for duplicates.

    2. The record ID number is displayed in the URL of the record when viewing it, so it is already onscreen if your user has their browser displaying the URL bar.

    With very minimal custom coding, you can make a calculated custom field that displays the ID number in the record the following way:

    1. For Accounts, create a custom text-type field in Studio called id_num_c

    2. Calculate this field with the following interim field variable: $name

    3. Save this new field in Studio

    3. In the code, locate/edit the file at:

    custom/Extension/modules/Accounts/Ext/Vardefs/sugarfield_id_num_c.php

    4. Edit the line:

    $dictionary['Account']['fields']['id_num_c']['formula']='$name';

    5. Change it to:

    $dictionary['Account']['fields']['id_num_c']['formula']='$id';

    6. Or install through Module Loader a custom file to the above file directory path with this definition change.

    I hope this helps!

  • Hi Katie DelValle,

    unfortunately you can't do this with SugarLogic on calculated fields but with SugarCRM Enterprise by using SugarBPM as it is executed "after_save".

    Here we go:

    1. create a text field like this and put it in your layouts

     {SugarClub Administrator Edit: We're sorry, but this image is no longer available}  

    2. set up a SugarBMP as follows

       a) start event is on new records only  

     {SugarClub Administrator Edit: We're sorry, but this image is no longer available}  

       b) add an action that adds the ID to your new field (important: the ID is not in the list so just choose a random item and    replace the field variable with 'id' )

     {SugarClub Administrator Edit: We're sorry, but this image is no longer available}  

       c) add an end event

    3. create a new record and enjoy :-)

     {SugarClub Administrator Edit: We're sorry, but this image is no longer available}  

    Note:

    This will work on new records only. To update existing ones, update the field via database or change the start event to "on every update" and find a way to update all your 150k records like: https://support.sugarcrm.com/Knowledge_Base/Import_Export/Updating_Records_Via_Import/

    Bests

    Björn Canales Pfisterer

    Technical Support Manager

    provalida GmbH

  • I will give this solution a try. The main reason why we were hoping to have the number displayed in the record is because for our sales process the sales reps will add in their pre-sales notes in Sugar. Once the sale is awarded the customer information is manually entered into a separate billing system - which then imports data to Sugar using the company name to check for duplicates. At the end of the day this has ended up creating a lot of duplicates. 

    I'll come back and update the thread if this works! Thanks again. 

  • Hey Patrick,

    I think the ID is needed in a visible field to copy it via c&p into the billing system which will be used to send the contracts back to its destination

    Cheers

    Björn Canales Pfisterer

    Technical Support Manager

    provalida GmbH

  • Instead of relying on manual entry which is subject to human error, I would suggest you look for a solution that actually integrates your Sugar and Billing, thus avoiding duplicates and manual entry.

    For example, assuming your Sales person finishes their part with a Won Opportunity. When the Opportunity is Won you could push data from Sugar to your Billing system to indicate that the sale is pending. When Billing then finalizes their side you can push back data to say it's done.

    You can leverage SugarAPIs both built-in and custom to do this, and you can maintain a mapping table of SugarID and BillingID so that when Sugar pushes to Billing you can look up the ID of the Billing system based on the SugarID and vice versa. That way if one or the other does not exist you know that the record needs to be created and you can do so as part of your syncing process.

    Just a thought, but it does require some programming and careful design dependent on your Billing system.

    Francesca

  • If on Professional, an after-save logic hook can easily populate the field in a similar way.

  • That would be great if we could integrate our billing system but we have a pretty specific billing system and it required a lot of custom development just to get the data to sync from billing to Sugar. We always had the dream of getting it to also sync the other direction but we've been finding it's a lot more complicated than we hoped for -- so hasn't been done yet. 

    It's a great idea though!! 

  • since I'm not a dev I can't help with such a solution but I would love to see an example of a logic hook as a comment ;-)

    Bests

    Björn

  •  Hi Patrick, 

    I know this is an older thread, but it's the closest one to what I'm searching for: the reason why an account ID cannot be displayed (trying to answer to Marketing Director's request, then question as to why Sugar doesn't have the native option add to record view). I have created a report for lookup, shared the url option, but cannot locate Sugar's reason for not allowing studio to add it to record view. Can you advise? Thank you for any info!

  • Hi Missy,


    To my understanding, there are three general reasons why the ID isn't in the view. The first is that if the ID is always available to the user via the URL - http://{sugar_url}/{module}/{id} . The second is because the ID should not be editable by the user as this would break relationships and bookmarks. Lastly, the ID isn't usually very human readable as it's a GUID and will look something like "c6ae641a-5c84-11ed-b49e-069eed229002".

    With that said, can you elaborate on your use case a little more to help me understand why the ID is needed? Tomorrow, I'll investigate a little more on how to properly add the ID to the layout and post the developer steps for you.