Added the possibility to assign temporary ids when there are no current npids assigned to records