block opportunity creation without contacts

I want to force the users to add contacts to all opportunity created. The opportunity should not save without a contact added. Also, is there a way to bring contacts to the primary panel of opportunity so it becomes a mandatory option?

Parents
  • You cannot block Opportunity creation based on a related record existing unless it's a relate field rather than a M-M relationship like the one between Opportunities and Contacts. The Opportunity has to exist before you can add a contact.

    One possible option, though, is to add a Relate field to Contacts on the Opportunity main panel and make the field required, you can call it "Primary Contact".

    Then, if you want to, you can add some custom logic that will also add a relationship between that contact and the opportunity in the original relationship record so the Contacts subpanel would show the primary contact there as well and any reporting based on that relationship would include them in as well.

    FrancescaS

  • If you look to the Opportunity-RLI relationship you find a waterfall relationship from Opps to RLIs which does not allow to save an Opp without an RLI. So, it is possible to extend the Opportunity create view JS controller by the code for Contacts also, BUT this creates highly customized code which must be checked with each upgrade.

    That's why I think the proposal from  is a much better way to solve this requirement.

Reply Children
No Data