Solved

Error: violates the constraint of type 'Field', when Extend endpoint

  • 11 July 2023
  • 7 replies
  • 126 views

I extent and point from default endpoint (version 22.200.001) of acumatica and I add new fields in the stockitem, then call the stockitem by postman to view warehousedetails(Qty on hand), getting exception message ‘GenericArguments[0], 'PX.Data.FieldNameParam', on 'PX.Data.Optional`1[Field]' violates the constraint of type 'Field'.’, but I m trying same with the default endpoint it working expected, please let me know what I did wrong by mistake. or how can I resolve it

 

Extended endpoint for Stockitem 

 

icon

Best answer by Zoltan Febert 12 July 2023, 16:20

View original

7 replies

Userlevel 7
Badge +11

Hi @ashrivastava42 ,

Can you please share the request URL?

I just added the Tracking method and tried it, its works for me.
 

 

Thanks for quick reply

URL:

{{URL}}/entity/ewsfendpoint/22.200.001/StockItem?$filter=InventoryID eq 'AACOMPUT01'&$select=InventoryID,Description,WarehouseDetails/WarehouseID,WarehouseDetails/QtyOnHand,ItemClass,BaseUOM&$expand=WarehouseDetails

Userlevel 7
Badge +11

Hi @ashrivastava42 ,

The above URL is looking good.

I hope that you extend the default like below.

 

Hello @jinin,

Yes, it’s right and I believe this is correct way.

Userlevel 7
Badge +11

Hi @ashrivastava42 ,

Yes, that is the correct way to extend the endpoint. Could you please create a new extend endpoint and try the same again?

Hello @jinin,

Yes, I did same and it is working, but in my current extended endpoint I have added so many entity to expose for integration, hear I am expecting to resolve the issue, otherwise I need to rework again in new endpoint to create same entity.

Userlevel 6
Badge +3

@ashrivastava42 You can add your old and new endpoint to a customization project. If you go to File / Edit Project XML in the customization project editor, you can see the “source code” of the endpoints, and you can find out what the difference is between them.

Reply


About Acumatica ERP system
Acumatica Cloud ERP provides the best business management solution for transforming your company to thrive in the new digital economy. Built on a future-proof platform with open architecture for rapid integrations, scalability, and ease of use, Acumatica delivers unparalleled value to small and midmarket organizations. Connected Business. Delivered.
© 2008 — 2024  Acumatica, Inc. All rights reserved