Monday, June 6, 2016

Get contacts info Using Id in Suit Crm

If you are using SuiteCRM, you know how important it is to keep your contacts organized and easily accessible. The good news is that with a few lines of code, you can easily retrieve contact information using their ID.

To start with, let's assume that you want to retrieve contact information for a person named "Foo Bar". In SQL, you would use the following command:


select * from contacts where name = 'Foo Bar';

However, in SuiteCRM, you can simply retrieve the contact information by creating a new contact object and then using the retrieve() method to retrieve the information for the contact with the specified ID. Here's the code:

php
$focus = new Contact(); $focus->retrieve('my record id');

Replace my record id with the actual ID of the contact you want to retrieve.

If you want to retrieve contact information using any other field, such as the email address or phone number, you can use the retrieve_by_string_fields() method. Here's the code for that:

php
$focus->retrieve_by_string_fields(array('name' => 'Foo Bar' ));

Replace name with the name of the field you want to use and Foo Bar with the value of that field.

With these simple lines of code, you can easily retrieve contact information for any contact in your SuiteCRM database. This can save you a lot of time and effort, especially if you have a large number of contacts to manage.

1 comment:

  1. Hi All!

    I'm selling fresh & genuine SSN Leads, with good connectivity. All data properly checked & verified.
    Headers in Leads:

    First Name | Last Name | SSN | Dob | Address | State | City | Zip | Phone Number | Account Number | Bank Name | DL Number | Routing Number | IP Address | Reference | Email | Rental/Owner |

    *You can ask for sample before any deal
    *Each lead will be cost $1
    *Premium Lead will be cost $5
    *If anyone wants in bulk I will negotiate
    *Sampling is just for serious buyers

    Hope for the long term deal
    For detailed information please contact me on:

    Whatsapp > +923172721122
    Email > leads.sellers1212@gmail.com
    Telegram > @leadsupplier
    ICQ > 752822040

    ReplyDelete