Developer forum

Forum » Integration » Getting the pricegroup prices

Getting the pricegroup prices

Michael Knudsen

Hello @here,

- I'm trying to get the prices from the different pricegroups found in a BC365 installation with the TestTool, and out of the box works this very well as long I specify the pricegroup number in the 'salesCode' param. The current BC365 contains approx. 20 pricegroups.

Can I somehow get all pricegroups without specifying each pricegroup number in the 'salesCode' param ?

<GetEcomData><tables><ProductPrices type="all" salesType="Customer Price Group" salesCode="" setCurrency="USD"/></tables></GetEcomData>


Br. Michael Knudsen


Dynamicweb Employee
Dmitriy Benyuk

Hi @Michael,
no, that is not implented in our standard code. If you are using D365BC On-premise and out latest extension installed you can go and implement your own logic on handling this specific kind of a request by subscribing to the OnBeforeExecuteGetEcomDataRequest event and implement your own logic there. See example code attached.

Also there is another option called "All Customers" that can be used in the salesType parameter that will not require to use specific salesCode, so maybe you can
change your prices in NAV/D365BC using that group instead of any from exising 20 price groups.

Kind regards, Dmitrij

Michael Knudsen

Hello @Dmitrij,

- and thanks for quick respons!  However, I can't use your answer, since the D365BC is running in the cloud and the customer wants to keep to the current price group setup.

I might be a feature request, but it would be awesome, if we just could add pricegroups in comma separated list like this:

<GetEcomData><tables><ProductPrices type="all" salesType="Customer Price Group" salesCode="101,102" setCurrency="USD"/></tables></GetEcomData>

Or if we could add a wildchar like * to get all pricegroups like this:

<GetEcomData><tables><ProductPrices type="all" salesType="Customer Price Group" salesCode="*" setCurrency="USD"/></tables></GetEcomData>


Br. Michael Knudsen


You must be logged in to post in the forum