Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

How can I make a 'primary contact' field required for a new opportunity

Posted on by Microsoft Employee

Hello Microsoft Community!

Could you please advise on how can I make a 'primary contact' field required for a new opportunity / account?

Thank you in advance! 

*This post is locked for comments

  • Verified answer
    Friyank Profile Picture
    Friyank 944 on at
    RE: How can I make a 'primary contact' field required for a new opportunity

    Create New Account

     08.png

    Currently it’s not mandatory

    8424.02.png

    Click Form

    2860.03.png

    Double Click Primary Contact Field

     8233.04.png

    In Details Tab Click Edit

    7585.05.png

     

    Set Field Requirement as Business Required.

    06.png

    Save and publish

    07.png

    Refresh your Account Screen or Again click new

    08.png

     

    Now primary Contact is mandatory

    And if you want on Edit page , Field Validation should get removed 

    Then add following code in your Onload Javascript. 

    function RemovePrimary() {
        var formType = Xrm.Page.ui.getFormType();
        if (formType == 2) {
            Xrm.Page.getAttribute("primarycontactid").setRequiredLevel("none");
        }
    }
    


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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,269 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,198 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans