I am new to Refit Library and having an issue filtering data using UserDefinedFields
.
Here is an example:
{
"items": [
{
"id": 0,
"companyName": "AmeriGas Cons",
"isDefault": true,
"lastActivityDate": "2023-08-07T02:52:57.12Z",
"ResourceID": 29682886,
"userDefinedFields": [
{
"name": "Cons Elec",
"value": null
},
{
"name": "Partner GID",
"value": null
}
]
},
{
"id": 174,
"companyName": "Janssen CoaocoStar,Inc.",
"isDefault": true,
"lastActivityDate": "2024-07-11T16:52:15.95Z",
"ResourceID": 29682886,
"userDefinedFields": [
{
"name": "Janssen Electronic",
"value": "12560.0000"
},
{
"name": "Referral GID",
"value": null
}
]
}
]
}
I have tried to create an interface with
[Post("/{routes}/query")]
[Headers("UserName: Name", "Key: **************", "ApiIntegrationcode: *******************")]
Task<string> GetDataByUDFAsync(string routes, [Query] string udfFields = null, [Query] string query = null );
where
routes
: is the tableudfFields
are fields used on filteringquery
is the condition (i.eitem eq 'ABC'
)
This results to an error 500
New contributor