Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Addition of Contact Phone number to opportunity form

(0) ShareShare
ReportReport
Posted on by

Is there any way to add the opportunity contact -> mobile phone number field in the opportunity form?  That way I don't have to click through to the contact to be able to call them about the opportunity.

CRM-Snip.PNG

*This post is locked for comments

  • Suggested answer
    Nithya Gopinath Profile Picture
    Nithya Gopinath 17,076 on at
    RE: Addition of Contact Phone number to opportunity form

    Hi,

    You could create a mobile phone number field in opportunity form and populate this field as the contact changes. You could register the following Javascript function on change of the contact field in opportunity form. 

    function RetrieveParentContactDetails() {
        debugger;
        var EntityId, LookupFieldObject;
        LookupFieldObject = Xrm.Page.data.entity.attributes.get('parentcontactid');
        if (LookupFieldObject.getValue() != null) {
            EntityId = LookupFieldObject.getValue()[0].id;
            var cols = "mobilephone";
            XrmServiceToolkit.Rest.Retrieve(
                EntityId,
                "ContactSet",
                cols,
                null,
                function (result) {
                    Xrm.Page.getAttribute('OpportunityFormMobileFieldName').setValue(result.MobilePhone);
                },
                function (error) {
                    console.log("failed");
                },
                false);
        }
    }

    Also, register the XrmServiceToolKit.js library on change of the contact field.

    Hope this helps.

  • Suggested answer
    RE: Addition of Contact Phone number to opportunity form

    Another way is to create a Mobile Number field on Opportunity and populate the field when Contact is populated by using Javascript.

  • Suggested answer
    BharatPremji Profile Picture
    BharatPremji 2,485 on at
    RE: Addition of Contact Phone number to opportunity form

    Hi,

    The best way would be to create a Quick View Form on the Contact entity.

    You could then add link this Quick Create form on the Opportunity form using the Contact lookup

    Regards

    Bharat

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Daivat Vartak – Community Spotlight

We are honored to recognize Daivat Vartak as our March 2025 Community…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Kudos to the February Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,516 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,432 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans