cancel
Showing results for 
Search instead for 
Did you mean: 

Selecting fields from ProductTreeLines inside a ProductTree query with Service Layer API

araob
Explorer
0 Kudos
541

Hi,

I'm just starting to work with Service Layer, and I found myself with a requirement to filter the fields returned by the Service Layer API.

In this case, we are querying the ProductTrees endpoint, which respond also with the ProductTreeLines.

But we don't want all the ProductTreeLines fields to be responded by the server, we want a subset only.

I know how to select the fields we want from the main entity (ProductTree) using the $select query param, but I'm strugling to select specific fields from the child object (ProductTreeLine).

Is there a way to do this?

Thanks in advance!

View Entire Topic
ANKIT_CHAUHAN
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi araob,

It doesn't seem like there is a direct option for querying on ProductTreeLines. It may not be possible. Please see if using SQLQuery is effective in this case.

Kind regards,

ANKIT CHAUHAN

SAP Business One Support

araob
Explorer
0 Kudos
Agreed. Only using the crossjoin, but not for a default query, unfortunately. Thanks for you cooperation Ankit!