I am making this functionality which is supposed to enable user to change dimensions (financial, NOT inventory) on posted documents such as invoices or payments but I am having problem with updating dimensions on posted invoice (sales order) lines. The problem occurs because I have to update those dimensions throughout the tables which store dimension values for this documents. I have found the solution how to update all the tables but one - LedgerTrans.
If I have a sales order with 2 lines and I post it. Then I find out that I have to change the dimensions on one of the lines. My functionality is supposed to change the dimensions from the voucher transactions form but what bugs me is that when I select, for example, the transaction which is posting a value in the revenue account for one line I don’t know how to relate the dimension change with the other transactions of the same voucher from Ledgertable which reffer to the same line. Along with that I have to update the corresponding data from TaxTrans and InventTransPosting tables which I also do not know how to accomplish.
Does anybody have any ideas how or if this is actually possible?