You have to modify the underlying query which can be found in the Queries tab in the AOT. I have written myself a guide on how to do this but I will just paste bits of it here to help:
The first step that is needed to be taken is to modify the query which the service uses. This can be found in the Queries node on the AOT. The queries follow a naming convention of Axd so for example, modifying the SalesInvoice service will require a modification of the AxdSalesInvoice query. The Data Sources node for this query can then be modified to match the business needs.
Once the query has been modified as desired, the next step is to update the various classes which the service depends upon to use the update query and it’s data sources. This can be done by clicking on Tools in the toolbar and then selecting Application Integration Framework and then selecting Update Document Service. Using the above example with the SalesInvoice service, the SalesSalesInvoiceService service class name will be selected and the Regenerate data object classes and Update AxBC classes checkboxes will be checked. Once this has been done, a new private project will be created containing the updated classes.
The next step is to refresh the service so that it is in sync with the AOS. This can be done by firstly going to the Services node in the AOT and then finding the desired service. Once this has been done, you need to Right Click and then go to Add-Ins and select Register Service. This will then bring up the AIF Service form where you’ll need to click on the refresh button. Once this has been done, the modified service is able to be used in the AIF and the user will be able to select the new fields added in the query data source.
Note: When you hit the refresh button it can take quite a long time for the services to refresh, sometimes as long as 20 minutes
Hope it helps!