Associating phone numbers on opportunities from parent lead

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • SkerryAmp
    Junior Member
    • Feb 2025
    • 3

    Associating phone numbers on opportunities from parent lead

    Am wondering if someone could tell me what I am missing or what I am doing wrong, or heck, if I am being stupid (I can take it).

    I have been tasked with adding phone numbers to opportunities which are tied to the parent lead.

    Opportunity didn't have phone number so I added a phone number field via json, so that shows up.
    I can set a single phone number from lead to opp.
    The trouble is phone number can be phoneNumbers - no matter what I have tried I cannot get them to show up.

    I have looked at relationships, nothing there seemed to help do what I want - maybe I missed something.
    Programmatically I can "get" the phoneNumbers from the lead, but I can't seem to "set" the phoneNumbers on the opp.

    I would share code but I have tried so many things there is no single codebase to draw from.

    Any guidance, suggestion or even a "hey dummy do this" (again I can take it and if it helps me move on I will gladly take it), would be a huge help.
    I will apologize I have only been working with Espo for literally a month so it is also possible I just don't know the right question to ask - but have been a developer for many year so can again, can take it =)

    We are on Espo 8.3.2 - we want to upgrade but are not in place to do that yet.
  • lazovic
    Super Moderator
    • Jan 2022
    • 864

    #2
    Hi SkerryAmp,

    Please tell me if I understand correctly that you want to fill a custom field for phone numbers in the Opportunity entity with several phone numbers from the Lead entity?

    Comment

    • SkerryAmp
      Junior Member
      • Feb 2025
      • 3

      #3
      Yes. When I add phone numbers to a lead I need those phone numbers to be saved to the related Opportunity. I can get it to work with a single phone number because I added a phoneNumber to Opportunity. However phoneNumbers appears to be different? I could not find where to add that, or how to add that, or if I needed to add that. So I am not sure if I am setting it incorrectly, or if I need to add a phoneNumbers field/entity to the Opportunity - that would make sense but again, not sure how to go about that.

      Comment


      • dreginald
        dreginald commented
        Editing a comment
        You can add a Phone Number field with script and write formula to copy from Lead. Or you can create a Foreign Field for the Phone number (only Primary Number will be available in Opportunity)
    • lazovic
      Super Moderator
      • Jan 2022
      • 864

      #4
      SkerryAmp,

      Please tell me what type of field for phone numbers in the Opportunity entity is? Varchar type, maybe Text one?

      Comment

      • SkerryAmp
        Junior Member
        • Feb 2025
        • 3

        #5
        My apologies - had personal issues come up and have not had a chance to respond. I was able to find by adding the phone number to entity_phone_number it does what I need it to do. Now just to work out how to add a number which was deleted without throwing a db error I will be all set, but that is a different issue for a different time. Thank you all.

        Comment

        Working...