Hi
i am testing a upload of users, some of the users have the department field set and some dont.
using the same request how would i code if the setdepartment is null?
tried
$departmentKey = (new GroupDepartmentKey());
if (!empty($data['Department'])) {
$departmentKey->setServiceProviderId($data['serviceproviderid']);
$departmentKey->setGroupId($data['groupid']);
$departmentKey->setName($data['Department']);
}
->setdepartment($departmentKey)
but get a Field serviceProviderId is required on CWM\BroadWorksConnector\Ocip\Models\GroupDepartmentKey
also tried
if (!empty($data['Department'])) {
$departmentKey->setName($data['Department']);
} else {
$departmentKey->unsetName();
}
Field name is required on CWM\BroadWorksConnector\Ocip\Models\GroupDepartmentKey
Hi i am testing a upload of users, some of the users have the department field set and some dont. using the same request how would i code if the setdepartment is null? tried $departmentKey = (new GroupDepartmentKey()); if (!empty($data['Department'])) { $departmentKey->setServiceProviderId($data['serviceproviderid']); $departmentKey->setGroupId($data['groupid']); $departmentKey->setName($data['Department']); }
->setdepartment($departmentKey) but get a Field serviceProviderId is required on CWM\BroadWorksConnector\Ocip\Models\GroupDepartmentKey
also tried
Field name is required on CWM\BroadWorksConnector\Ocip\Models\GroupDepartmentKey
many thanks