Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Published by Scroll Versions from this space and version 2021.3

This Custom Logic is for a Custom Validation.

Code Block
languagephp
titleService Orders Require Owner
linenumberstrue
if ($data["RECID"] != "addNew" && $params['sd_type'] == 'sd-service-order' && 
    $data['SD_STATUS_LISTS_RECID'] == $this->listGetByCode('SD_STATUS', 'COMPLETE') &&
                empty($data['D_OWNER_CONTACTS_RECID']) &&
                empty($data['D_OWNER_DEPT_HIERARCHY_RECID'])
            ) {
  
                    $this->setMessage("An owner is required to complete the order. <br>" .
                                      "Please select an owner then save the record again.");
                                    return false;

            }
          //  return true;