SugarCRM compulsory/ mandatory relationship

How to configure relationship between 2 modules mandatory/ compulsory?

Real life example, we have 2 custom module “Store” and “Machine Acquisition”. On new “Machine Acquisition” record creation, we need to ensure user select which “Store” the “Machine Acquisition” record belongs to.

Solution: Add displayParams to the <sugar root>/custom/modules/<ModuleName>/metadata/editviewdef.php

'displayParams' => array(
  'required' => true,

Reference: SugarCRM forums