I am attempting to get the Tax Rate from a SalesInvoice.
I have created a custom field - in SalesInvoice->TaxDetails I added TaxRate with the Mapped Object Taxes and the mapped field Tax Rate.
I am calling this field, and others with a GET request to the following:
/entity/[My Custom Endpoint]/22.200.001/SalesInvoice?%24filter=CustomerOrder%20eq%20'nnnnnnnnnnn'&%24expand=Details,TaxDetails&%24select=CustomerID,CustomerOrder,ReferenceNbr,Description,Amount,Status,Details%2FOrderNbr,TaxDetails%2FTaxRate
Without my custom field in the URI the result is as expected.
With my custom field I get:
"Optimization cannot be performed.The following fields cause the error:\r\nTaxDetails.TaxID: View Taxes has BQL delegate\r\n",
How can I get the data from my custom field? Or, do I need to set the custom field up differently?