When a lookup column in Dataverse saves as blank, it usually means the lookup value was not provided in the exact format Dataverse expects. Dataverse will save all other fields but silently ignore a lookup if the reference is not valid.
You need to verify:
1. Schema name of the Lookup Field:
The left side must use the lookup field’s
schema name, and it is case-sensitive:
sp_HotelCode@odata.bind
2. Correct Entity Set Name:
The value must point to the
entity set name, not the logical name like "/sp_hotelses(<GUID>)"
Make sure
sp_hotelses is the correct entity set name for your hotels table.
3. Valid GUID:
formData.hotelId must contain a valid Dataverse record ID with no braces and if the GUID is null, empty, or malformed, Dataverse will ignore the lookup.
4. proper OData binding format must be there Actually
"sp_HotelCode@odata.bind": "/sp_hotelses(Actual GUID)"
5. The lookup must be configured to point to the same table you are referencing.
6. The user/service principal must have:
7. Read access on the referenced table and create/Write on the target table, otherwise the lookup will save blank.
8. If you are patching from Power Apps, the lookup must be sent as an object:
sp_HotelCode: {
'@odata.type': "#Microsoft.Dynamics.CRM.sp_hotel",
sp_hotelid: formData.hotelId
}