I have two dynamic 365 finance and operation environments, sandbox and devbox.
I setup database logging from application in staging environment for Sales order line(SalesLine) table field: Unit quantity(SalesQty). I changed the qty on the line of on of the sales order. The history tab on the database log form showed that the same sales order line was changed but it doesn't show the old value for the sales quantity.
I did the same in dev box but unlike sandbox it showed me the old value for the sales quantity along with new value. So I debug the code and found out that the values are stored in SysDatabaseLog table and following query showed that that the values are there but not showing in Staging while same values are showing in dev box.
select l.DESCRIPTION, l.NEWDATA, l.DATAAREAID from SysDatabaseLog l
inner join TABLEIDTABLE t on t.ID = l.TABLE_
where t.NAME = 'SalesLine'
The NewData field on SysDatabaseLog table is a container field which simply populates a list object and show it in FormListViewContro of the SysDatabaseLog form.
I think that there is something different at sql server level but don't know why. Both VMs have similar database and is on same version 10.0.17. I see the trigger is created in SalesLine table.
Any idea what's being done wrong here?