Hello,
I have used ODATA service to get details of 'NoSeriesLines' of VEND , it is working fine.
I want to update the Last_No_Used in NoSeriesLines (as shown in highlighted image) using below code
string updateUrl = "https://api.businesscentral.dynamics.com/v2.0/acb64e3567a44d24e/Sandbox/ODataV4/Company('CRONUS%20USA%2C%20Inc.')/NoSeriesLines?$filter=Series_Code eq 'VEND'";
// Construct the HTTP request
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(updateUrl);
request.ContentType = "application/json";
request.Method = "PATCH"; // Use PATCH for updating records
// Add authorization header
request.Headers.Add("Authorization", "Bearer " + authToken);
// JSON payload for updating Last_No_Used
string jsonPayload = @"
{
""Last_No_Used"": Last_No_Used
}";
but, it is giving error of 'The remote server returned an error: (405) Method Not Allowed.', as per error looks like ODATA web service I am using for update record is not correct.
Please help me to find the correct ODATA webservice page to update the records in NoSeries in BC.