Entry name Untitled

Hi! When I’m creating entries all appear as Untitled this is my script:

const { type, body, type2, slug } = entry;
      return environment
        .createEntry(createGenericObject.sys.id, {
          displayField: body,
          fields: {
            [type]: {
              'en-US': body
            [type2]: {
              'en-US': slug

I read that just by adding “displayField” would fix it, but it doesn’t perhaps I need to put it somewhere else ?

Just in case someone has the same question the "displayField should be inside createContentType function and not inside createEntry.