cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Tomeczek
Frequent Visitor

Update Event Item with HTTP Request to SharePoint ERROR: "An entry without a type name was found, but no expected type was specified. "

Hi everyone,

 

I am trying to update an event list item with the PATCH method and an HTTP request to SharePoint. I want to change the "All day event" to true for bank holidays. I couldn't figure out what I am doing wrong. I always receive the following error:

 

An entry without a type name was found, but no expected type was specified. To allow entries without type information, the expected type must also be specified when the model is specified.

 

This is how the HTTP request looks like

 

Tomeczek_0-1621254965818.png

 

Glad for any kind of help 🙂

1 ACCEPTED SOLUTION

Accepted Solutions
Expiscornovus
Super User II
Super User II

Hi @Tomeczek,

 

It looks like your are missing a leading underscore character in your body value.

 

However, you can update without the metadata part. Below is an example of a POST request with different headers and a different body value. Let me know if that works for you.

 

Headers

{
  "Accept": "application/json;odata=nometadata",
  "Content-Type": "application/json;odata=nometadata",
  "If-Match": "*",
  "X-HTTP-Method": "MERGE"
}

 

Body

{
"Title": "All Day Event Test date time",
"EventDate": "@{variables('Date')}",
"fAllDayEvent": true
}

 

alldayevent.png

View solution in original post

2 REPLIES 2
Expiscornovus
Super User II
Super User II

Hi @Tomeczek,

 

It looks like your are missing a leading underscore character in your body value.

 

However, you can update without the metadata part. Below is an example of a POST request with different headers and a different body value. Let me know if that works for you.

 

Headers

{
  "Accept": "application/json;odata=nometadata",
  "Content-Type": "application/json;odata=nometadata",
  "If-Match": "*",
  "X-HTTP-Method": "MERGE"
}

 

Body

{
"Title": "All Day Event Test date time",
"EventDate": "@{variables('Date')}",
"fAllDayEvent": true
}

 

alldayevent.png

View solution in original post

Tomeczek
Frequent Visitor

Thanks!! It worked 🙂

Helpful resources

Announcements
Process Advisor

Introducing Process Advisor

Check out the new Process Advisor community forum board!

MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Top Solution Authors
Users online (30,612)