1

Error message: The property 'RequesterEmpID' does not exist on type 'SP.Data.XYZListItem'. Make sure to only use property names that are defined by the type.

I edited some of the list column names in SharePoint. after which I get this error. 'RequesterEmpID' is one of the list column which was renamed.

Code:

  export function addDatatoSharepoint(props){ 
  return dispatch => {
    props.Web.lists.getByTitle('Listname').items.add({
      RequesterName: props.FirstName + " " + props.LastName,
      RequesterJobTitle: props.Title, 
      RequesterEmpID: props.EmpID, 
      RequesterDepartment: props.Department, 
      RequestDate: new Date().getDate(),
      DocumentID: props.DocumentID,  
    }).then(r => {
        console.log(r);
    });
  }
}

enter image description here

3
  • What is the type of RequesterEmpID column? – Amos Oct 13 '20 at 8:24
  • Hi @Amos_MSFT, thank you for the quick response. The type of RequesterEmpID column is Single line of text. – Riya Oct 13 '20 at 9:17
  • 1
    As Ganesh saied,you need to check the internal name of RequesterEmpID column. – Amos Oct 13 '20 at 9:33
1

While adding item to SharePoint list, we need to use the internal name of the column.

Check the internal name of your RequesterEmpID column using below link and use it in your code:

Find the internal name of SharePoint column

1
  • Exactly the internal name is different. Thank you!!. – Riya Oct 13 '20 at 9:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.