for (Long domainId : domainIds) {
Domain assignedDomain = domainService.get(domainId);
InviteeForm inviteeForm = new InviteeForm();
inviteeForm.setEmail(domainRequest.getEmailAddress());
inviteeForm.setName(domainRequest.getFirstName() + " " + domainRequest.getLastName());
UserRole userRole = DomainType.GROUP.equals(assignedDomain.getDomainType()) ? UserRole.ROLE_GROUP_USER : UserRole.ROLE_ORG_USER;
inviteeForm.setUserRole(userRole);
success = invitationControllerService.inviteUserToDomain(domainRequest.getEmailAddress(), domainId, userRole, false);
}
domainRequestService.delete(requestId);