MDL-16982 Administration: Moved bulk action outside loop and using profile api to save data