Purchase Document Dimension to G/L Dimension

BagheeraBagheera Member Posts: 57
Hello all,

I am trying to create and post a purchase order that has dimensions on its lines. Apart from the Dimension Code and Dimension Value Code fields I also have a custom field that contains some information. I want the information in that custom field to be transfered to the GL Entry dimension that is caused by this purchase order. Dimension Code and Dimension Value Code get transfered just fine.

I realise that when I enter dimensions in a purchase order these are kept in the Document Dimension table. Then when the order is posted they get transfered in the Posted Document Dimension. Then they get transfered to the Journal Line Dimension and from there to the Ledger Entry Dimension. I have managed to maintain the custom information for the Posted Document Dimension table but after that it gets lost.

I checked thoroughly the whole DimensionManagement codeunit and there modified the MoveDocDimToPostedDocDim, MoveOneDocDimToPostedDocDim, CopyDocDimToJnlLineDim, MoveJnlLineDimToLedgEntryDim and all relative functions to contain the new field but nothing worked.

I can get Journal Line -> Ledger Entry Dims to preserve the information
I can get Document -> Posted Document Dims to preserve the information
I can not get the Document -> Journal/Ledger Dims to preserve the information.


Do you have any idea but past experience how the information gets transfered around?

Thank you in advance and apologies for the long post.
animateduserbar6sx.gif

Answers

  • girish.joshigirish.joshi Member Posts: 407
    If the Dimensions you are posting to are dimensions on the line, be sure to take a look at the UpdInvPostingBuffer in the Posting routine (on the purchase side, it must be something similar on the Sales side).

    It looks like the values from the actual dimensions are brought into a TempDimension variable and then posted. You'll have to make a modification there.
  • BagheeraBagheera Member Posts: 57
    Thank you very much it actually worked. I never noticed that function because I thought it had to do with inventory dimensions where I only have G/L accounts in the purchase lines.

    Once again, thank you very much.
    animateduserbar6sx.gif
Sign In or Register to comment.