Skip to main content

Hey All

 

hope everyone is having a great weekend!

 

i’m struggling with this Request i’m trying to make to

GET: /ProjectTransactions,

 

i want to get ProjectTaskID or ProjectID 

 

but when i added it i get this error 

{\"message\":\"An error has occurred.\",\"exceptionMessage\":\"GenericArgumentsc0], 'PX.Data.FieldNameParam', on 'PX.Data.Current`1.Field]' violates the constraint of type 'Field'.\

 

 

 

 

 

Thanks

I think you have to add the details into a separate entity because it is a child of the project. Similar to how the Details of a Sales Order at set up and queried.

 


@Django Thank you for your reply, this right ?

 

 


Looks good.  Then you make the GET call to ProjectTransaction and include $expand=Details to show the detail records and fields in the result set.


@Django it shows new error i tried to call this /ProjectTransactionDetail i guess it a GI and it need PUT instead of GET 

with GET i receive this error 
\"message\":\"An error has occurred.\",\"exceptionMessage\":\"Entity without screen binding cannot be used as top level entity.\",\"exceptionType\":\"PX.Api.ContractBase

With PUT 


    "message": "{\"message\":\"The request is invalid.\",\"modelState\":{\"\"::\"The request body should not be empty.\"]}}"


Thanks


You don’t call the child entities directly. Make your GET to ProjectTransaction and add to the URL $expand=Details along with any filtering on the Header entity that you want. This will give you the Summary (Header) record and fields and the detail records and fields related to the ProjectTransaction records that your request asks for.

 


@Django I see it worked! Thank you so much becasue i want to filter using taskID inside details array is that possible 

/ProjectTransaction?$expand=Details


Thanks 


It isn’t possible to filter the details in the call. The calling application would have to do that after it receives the result set.


@Django Thank you so much i will check and see


Reply