Document toolboxDocument toolbox

(v1) Service Orders Require Owner

This Custom Logic is for a (v1) Custom Validation.

Service Orders Require Owner
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;

Help Desk Portal - Email: help@pcr.com - Phone: 616.259.9242