Hi,
I have a situation where I receive two different responses from the actual website and the DW BC Test plugin Unit in BC when using same request.
The difference is in the website live integration
<column columnName="ProductPrice"><![CDATA[143.67]]></column>
VS the BC Test plugin Unit in
<column columnName="ProductPrice"><![CDATA[271,59]]></column>
The BC Test plugin Unit in correct ofc.
I am curious as to how and what the difference is when using the DW BC Test plugin Unit in BC and the response received VS the actual website?
Is there any differences or anything under the hood that is different, since this is possible?
//Jan
Developer forum
E-mail notifications
Dw9.20.1 Live integration Response VS DW Bc Plugin Test Unit Response (In BC)
Replies
Hi Jan,
in the BC you can change the Region for your logged in current user in the "My Settings" so it will format the response numbers in the BC DW Test tool according to the selected Region
which may differ:
BR, Dmitrij
Hi Dmitriy ,
Is this likely the cause when the price returned is correct in BC Test tool? So in BC is is correct, but on homepage it is not.
Let me know.
Hi Jan,
no, this is just for the numbers output formatting in the BC DW Test tool, it is not connected with the output from the codeunit webservice. Can you explain more what is your problem?
Is the price is not exactly the same for the same request in the Live integration response or smth else?
BR, Dmitrij
Hi Jan,
the code base executed in both cases is exactly the same, the only difference is the output for the numbers formatting decimal separators (according to the BC logged in user Region locale settings) but this is what BC does by itself for the output: dot used as a decimal separator and comma as a thousand separator. Seems there is no feature to change the formatting for the codeunit output.
So the only difference should be just the separators but not the numbers. Can you try to make a new order in BC manually with the pointed product and use same the customer, currency, quantity as in the requests to see what price will BC use and compare with the codeunit output?
BR, Dmitrij
Hi, when creating an order in BC it also return correctly 271,59.
The only place it does not, is in the live integration from the web.
There is custom code in the live integration codeunit in BC, but both the testtool and the web liveintegration would execute everything the same way I would assume.
That is why we find it weird that we have two different numbers from the testtool in BC and liveintegration on the webpage.
It is not a number formatting issue, since the number is completely different. The number 143.67 from the webpage can be explained in the sense that it is applying a discount it should not - since the pricelist has a "do not add linediscount." It does anyway. But only on web. Not in the test tool in BC. Also if I look in the table EcomPrices from what is returned from the Web, the price is there correct.
This is what is returned via web live integration:
<?xml version="1.0" encoding="utf-8"?>
<tables version="1.2.0.61_NAV27.0.45543.0">
<table tableName="EcomProducts">
<item table="EcomProducts">
<column columnName="ProductId"><![CDATA[83201792251]]></column>
<column columnName="ProductVariantId"><![CDATA[]]></column>
<column columnName="ProductIdentifier"><![CDATA[83201792251..LANG1.STK]]></column>
<column columnName="ProductNumber"><![CDATA[83201792251]]></column>
<column columnName="ProductName"><![CDATA[PROFILCUT Q KNIVE MC 15.2X15.5X2.4, PT5.6 ID NR. 168392251 TEG ID:168146895/168433262/168392023]]></column>
<column columnName="ProductPrice"><![CDATA[143.67]]></column>
<column columnName="ProductPriceWithVat"><![CDATA[179.59]]></column>
<column columnName="ProductStock"><![CDATA[0]]></column>
<column columnName="ProductCurrencyCode"><![CDATA[]]></column>
<column columnName="ProductDefaultUnitId"><![CDATA[Unit_STK]]></column>
<column columnName="PriceAmount"><![CDATA[143.67]]></column>
<column columnName="PriceAmountWithVat"><![CDATA[179.59]]></column>
</item>
</table>
<table tableName="EcomPrices">
<item table="EcomPrices">
<column columnName="PriceProductId"><![CDATA[83201792251]]></column>
<column columnName="PriceProductVariantId"><![CDATA[]]></column>
<column columnName="PriceUserCustomerNumber"><![CDATA[97710277]]></column>
<column columnName="PriceProductUnitId"><![CDATA[Unit_STK]]></column>
<column columnName="PriceQuantity"><![CDATA[1]]></column>
<column columnName="PriceAmount"><![CDATA[271.59]]></column>
<column columnName="PriceAmountWithVat"><![CDATA[339.49]]></column>
</item>
</table>
</tables>
This is from BC Testtool inside BC:
<?xml version="1.0" encoding="utf-8"?>
<tables version="1.2.0.61_NAV27.0.45543.0">
<table tableName="EcomProducts">
<item table="EcomProducts">
<column columnName="ProductId"><![CDATA[83201792251]]></column>
<column columnName="ProductVariantId"><![CDATA[]]></column>
<column columnName="ProductIdentifier"><![CDATA[83201792251..LANG1.STK]]></column>
<column columnName="ProductNumber"><![CDATA[83201792251]]></column>
<column columnName="ProductName"><![CDATA[PROFILCUT Q KNIVE MC 15.2X15.5X2.4, PT5.6 ID NR. 168392251 TEG ID:168146895/168433262/168392023]]></column>
<column columnName="ProductPrice"><![CDATA[271,59]]></column>
<column columnName="ProductPriceWithVat"><![CDATA[339,49]]></column>
<column columnName="ProductStock"><![CDATA[0]]></column>
<column columnName="ProductCurrencyCode"><![CDATA[]]></column>
<column columnName="ProductDefaultUnitId"><![CDATA[Unit_STK]]></column>
</item>
</table>
<table tableName="EcomPrices">
<item table="EcomPrices">
<column columnName="PriceProductId"><![CDATA[83201792251]]></column>
<column columnName="PriceProductVariantId"><![CDATA[]]></column>
<column columnName="PriceUserCustomerNumber"><![CDATA[97710277]]></column>
<column columnName="PriceProductUnitId"><![CDATA[Unit_STK]]></column>
<column columnName="PriceQuantity"><![CDATA[1]]></column>
<column columnName="PriceAmount"><![CDATA[271,59]]></column>
<column columnName="PriceAmountWithVat"><![CDATA[339,49]]></column>
</item>
</table>
</tables>
Are your requests the same as well? Do they have the same customer number?
Hi Jan,
could you try to remove/uninstall your custom code extension and check if it makes any difference?
It looks strange in terms of the output as it is also different while it must not be, see marked lines in red:
The fields <column columnName="PriceAmount"> <column columnName="PriceAmountWithVat">
are only added by the standard codeunit code to the EcomPrices section but not to the EcomProducts.
Maybe those are two different BC instances, fx Production and a Sandbox?
BR, Dmitrij
For information. We found the issue. And it was in there end. Thank you for your time. It was a block of custom code that was the issue
You must be logged in to post in the forum