locked
Add list item with content type .. spfx or rest sample .. sharepoint online RRS feed

  • Question

  • I have a list where content type is associated . I want to add a list item with attachment from spfx using  sp-pnp .

    Please help .

    sp.web
          .getFolderByServerRelativeUrl("Student%20Details%20No%20Content%20Type")
          .files.add(fileContent.name, fileContent, true)
          .then(f => {
            f.file.getItem().then(item => {
              item.update({
                Title: "A Title",
                Description: "My Other Value"
              });
            });
          });

    Monday, March 4, 2019 12:49 PM

All replies