I am using REST Client to make API calls to default 20.200.001 endpoint. When I include Staff in my Select input I am getting an error. If I do not include “Staff/Description” in my Select, I get the results.
using Acumatica.Default_20_200_001.Api;
using Acumatica.RESTClient.Client;
public async Task<List<Acumatica.Default_20_200_001.Model.Appointment>> GetAppointmentList(string token)
{
if (apiClient.Token == null)
apiClient.Token = new Acumatica.Auth.Model.Token();
apiClient.Token.Access_token = token;
apiClient.Token.Token_type = "Bearer";
AppointmentApi appointmentApi = new AppointmentApi(apiClient);
string expand = "Staff";
string select = "ActualDuration,ActualEndDate,ActualEndTime,ActualHandleManually,ActualServiceDuration,ActualStartDate,ActualStartTime,AppointmentNbr,Description," +
"Location,ScheduledDuration,ScheduledEndDate,ScheduledEndTime," +
"ScheduledStartDate,ScheduledStartTime,ServiceOrderNbr,ServiceOrderType,Status,WorkflowStage," +
"Staff/Description";//,Staff/StaffMember";
string filter = "ServiceOrderType eq 'TMVT'";
List<Acumatica.Default_20_200_001.Model.Appointment> appointments = await appointmentApi.GetListAsync(select: select, expand: expand, filter: filter, top: 10);
return appointments;
}
Error:
Error 500 calling GetList: Internal Server Error
An error has occurred. : An error occurred during processing of the field IsCustomerOrCombined: Input string was not in a correct format.. : {
"message": "An error has occurred.",
"exceptionMessage": "Input string was not in a correct format.",
"exceptionType": "System.FormatException",
"stackTrace": " at System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal)\r\n at System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info)\r\n at System.Byte.Parse(String s, NumberStyles style, NumberFormatInfo info)\r\n at PX.Data.PXXmlDataRecord.GetBoolean(Int32 i)\r\n at PX.Data.Extensions.GetValue(PXDataRecord record, Int32 i, Type type)\r\n at PX.Data.PXDBCalcedAttribute.RowSelecting(PXCache sender, PXRowSelectingEventArgs e)\r\n at PX.Data.PXCache.OnRowSelecting(Object item, PXDataRecord record, Int32& position, Boolean isReadOnly)"
}
