Skip to main content
Solved

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


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 

 

Best answer by Zoltan Febert

@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.

View original
Did this topic help you find an answer to your question?

7 replies

jinin
Pro I
Forum|alt.badge.img+11
  • Pro I
  • 701 replies
  • July 11, 2023

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


jinin
Pro I
Forum|alt.badge.img+11
  • Pro I
  • 701 replies
  • July 11, 2023

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.


jinin
Pro I
Forum|alt.badge.img+11
  • Pro I
  • 701 replies
  • July 12, 2023

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.


Zoltan Febert
Jr Varsity I
Forum|alt.badge.img+3
  • Jr Varsity I
  • 176 replies
  • Answer
  • July 12, 2023

@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


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings