prepare entity_new_with_sd external for entity replacement and forced indexes