Skip to main content
Solved

Filter Sales Orders using USER Defined Rest APi

  • July 12, 2023
  • 2 replies
  • 322 views

Driss
Jr Varsity III
Forum|alt.badge.img

Hey All 

I’m Trying to filter all sales orders using USER-DEFIND field 

 

 

 

I’m using this Endpoint 

Method : POST 

URI: https://exemple.acumatica.com/entity/default/22.200.001/SalesOrder?$custom=Document.AttributeCPQORDNBR.value
&$filter=custom.document.AttributeCPQORDNBR eq '00000110'&$top=100


but it not working even i can see the custom field in the JSON 

Error :

message\":\"An error has occurred.\",\"exceptionMessage\":\"The child type 'custom.document.AttributeCPQORDNBR' in a cast was not an entity type. Casts can only be performed on entity types.

 

 

 

Much appreciated 

 

Thanks

Best answer by kpopova

Please see the description of the filter parameter here: https://help.acumatica.com/(W(17))/Help?ScreenId=ShowWiki&pageid=f279ec05-2f71-4376-a76f-d3ed0e0e2556 and Example: Condition on a Field Not Defined in the Endpoint on the same page. You need to use custom cf function in the filter.

2 replies

kpopova
Acumatica Employee
Forum|alt.badge.img+2
  • Acumatica Employee
  • Answer
  • July 13, 2023

Please see the description of the filter parameter here: https://help.acumatica.com/(W(17))/Help?ScreenId=ShowWiki&pageid=f279ec05-2f71-4376-a76f-d3ed0e0e2556 and Example: Condition on a Field Not Defined in the Endpoint on the same page. You need to use custom cf function in the filter.


Driss
Jr Varsity III
Forum|alt.badge.img
  • Author
  • Jr Varsity III
  • July 13, 2023

@kpopova Thank you so much!