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! 

Parents
  • 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 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.

  • Thank you ,

    Our Director of Marketing uses a transfer file to associate a variety naming protocols we've used for our Customers over the years for the same customer. Serving Utilities, Cooperatives and Municipalities makes it very challenging sometimes to keep names up-to-date, esp. when mergers happen, or they update names (and we aren't alway informed).  An added challenge has been that our Marketing platforms have changed multiple times and Billing lives outside Sugar (the only Process, pretty much). 

    Because every area of our company uses Sugar for their processes, Marketing relies on reports to tie in forms of engagement but deals with a lot of noise because of variations of naming conventions. 

    When he needs to verify contact or product info he was hoping that by having the account ID able to be displayed it would save time verifying other items, and afford the ability to place in a preview, dashlet, etc., or extend other capabilities of fields living in Studio. 

    On my behalf, I just thought it curious I couldn't locate infomation about the reason why it couldn't be displayed. Your reply makes sense to me; but when Users ask me why Sugar CAN'T do something,  I feel a responsibility to find out why :) 

    Thanks for the enlightenment!

    Missy

  • Hi Missy,

    I completely understand and it doesn't hurt to ask Slight smile

    If you wanted to proceed with this type of customizarion to Accounts, a developer would need to create:

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

    <?php
    
    //enable the id field in studio
    $dictionary['Account']['fields']['id']['studio'] = true;
    
    //default the fields view properties
    $dictionary['Account']['fields']['id']['displayParams'] = [
        //make sure this field is readonly
        'readonly' => true,
        //hide the id on create views
        'dependency' => 'greaterThan(strlen($id),0)'
    ];
    

    Then navigate to Admin > Repairs > Quick Repair and Rebuild. The ID field will now be available for Accounts in Studio.


    I've also created a more detailed post with an installable package should your team want to test out this customization: 

    upsertconsulting.com/.../

  • Thanks for this information. I appreciate your willingness to help and share!

Reply Children
No Data