Variable Pricing Error Message
There may have been times that a Contract has been changed from a Purchase to a Sales when there are already line items present. This scenario can cause knock on affects.
One such instance is when creating a variable price on the Contract.

Error message:
The field Vendor/Customer No. of table Contract Line contains a value (C07900) that cannot be found in the related table (Vendor).
Internal session ID:
d0fe2952-6caa-42fa-99d2-7ebf165e3c50
Application Insights session ID:
3ddb5f86-d1f3-4b4e-92db-d4fe396e7292
Client activity id:
075ebef2-ad6b-4684-aa2c-5b1c61ac1e2a
Time stamp on error:
2024-07-30T14:45:29.1398348Z
User telemetry id:
ccca80e8-074f-4c85-84cf-7d7afb3355f1
AL call stack:
"CUK Contract Header"(Table 50101).UpdateValueOnLines line 15 - MBP Contracts and References by Columbus UK
"CUK Contract Header"(Table 50101)."Vendor/Customer No. - OnValidate"(Trigger) line 25 - MBP Contracts and References by Columbus UK
"CUK Contract Header"(Table 50101).LookupVendorCustomer line 7 - MBP Contracts and References by Columbus UK
"CUK Contract Header"(Table 50101)."Vendor/Customer Name - OnLookup"(Trigger) line 2 - MBP Contracts and References by Columbus UK
In the above case the line item still thinks it is a purchase contract due to the value 'Contract Type' = Purchase.
Refreshing the line item by removing the Contract Item No and re-adding resolves this.
Be aware you will need to add the quantity again.