phoneNumber (Mobile)

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • a.brescia@voss-t.de
    Junior Member
    • Feb 2021
    • 6

    phoneNumber (Mobile)

    Hi there,
    I would like to write the phoneNumber (Mobile) in a text field when saving an account.

    phoneHome = phoneNumber;
    phoneMobil = phoneNumber (mobile);

    how does it work?

    Thanks very much.
  • esforim
    Active Community Member
    • Jan 2020
    • 2204

    #2
    You would need to disable the validation by changing the code (you shouldn't), or create a new field type (varchar) that support numbers and alphabet and use that field as "Mobile"

    The pronlrm is you can't just click "+" for additional phone, each field you have to create one, for example: phoneNumber, phoneMobile, phoneFax.

    Otherwise you have to use an extensions, write code yourself or use entity relationship for multiple phone.

    Comment

    • a.brescia@voss-t.de
      Junior Member
      • Feb 2021
      • 6

      #3

      The background is the transfer of the data (phone numbers, name)
      to a metadirectory with ODBC.
      A SQL query would also work.
      What should the query look like?

      Thanks for ideas

      Comment

      • telecastg
        Active Community Member
        • Jun 2018
        • 907

        #4
        Use this SQL query to retrieve the Account name and mobile phone number(s) directly from the EspoCRM database:
        Code:
        Select account.name As `account_name`, phone_number.name as `formatted_number`, phone_number.numeric as `numeric_phone`
        From account
        Inner Join entity_phone_number On entity_phone_number.entity_id = account.id
        Inner Join phone_number On phone_number.id = entity_phone_number.phone_number_id
        Where entity_phone_number.entity_type = "Account" and phone_number.type = "Mobile"
        Last edited by telecastg; 08-31-2021, 06:07 AM.

        Comment

        • a.brescia@voss-t.de
          Junior Member
          • Feb 2021
          • 6

          #5
          Thanks for the help.
          It works.
          It would have taken me hours to do this - thank you!

          Comment


          • telecastg
            telecastg commented
            Editing a comment
            You're very welcome, I used a free app FlySpeed SQL that I highly recommend to build complex queries.

            What I do is to have a mirror image of my Espo instance in a local server and I use this tool to look at the database structure, it makes it very easy to visualize and understand how Espo stores data.
        Working...