Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Answered

Transfer order financial voucher for item transfers between sites

(0) ShareShare
ReportReport
Posted on by 65

Hi experts,

When we create a transfer order for item transfers between different sites, upon receiving the order, a financial voucher is created. This creates a record in GeneralJournalAccountEntryTable. On this table , we have a field for ledger account which is a combination of Main account and default financial dimension values. I want to change one of the default fin dim values through code and generate overwrite this ledger account value before it gets inserted. Can someone point me towards the classes I should be looking into for this ? 

Thanks a lot for help !

  • Verified answer
    amit_s Profile Picture
    65 on at
    RE: Transfer order financial voucher for item transfers between sites

    Figured out the soulution to this.

    There is a class named InventMov_Transfer : this class has a method called defaultDimension().This class has 4 extensions for Transfer from WH , Transfer to WH, Transfer from transit WH and Transfer to transit WH. Since i wanted to change the  dimensions based on each warehouse (To, from, transit from, transit to) i extended the defaultDimension() method on each of these extension classes. If the dimensions are same for all the 4 warehouse locations, we can just extend the base class InventMov_Transfer. 

  • amit_s Profile Picture
    65 on at
    RE: Transfer order financial voucher for item transfers between sites

    Thank you for the suggestion, Andre. The reason to change this value is that the dimension value is being maintained in a separate custom table. This table maintians the fin dim value for a site and warehouse combination. I need to update the dimension value by looking up the site and warehouse on the TO from this table and then populate the corresponding ledger account based on this.For this reason , we cannot maintain the financial dimensions at item level as the value for this will change based on the site and warehouse in TO.

    I was able to override the default dimension method in the InventMov_Transfer class and verify that the ledger account string is getting populated with my desired value. What i am not able to do is post this voucher as the error still says that i am missing the financial dimension.

    I checked from SQL and it creates a record for shipping in GeneralJournalAccountEntryTable but the record for receiving is not getting generated.

    After some debugging, i see that the voucher for receiving gets created and gets the correct value for ledger account but for some reason will not allow posting and errors out.

    I will look further into the classes for InventTransPosting to see if there is something I can find. Thank you for your time.

  • André Arnaud de Calavon Profile Picture
    294,118 Super User 2025 Season 1 on at
    RE: Transfer order financial voucher for item transfers between sites

    Hi Amit,

    What is the exact reason that you need to change a value? A default value can be maintained on the product master. What exactly would drive the value for the dimension in your organization?

    I haven't done this myself before. It is a quite tricky customization to change the default inventory and ledger posting logic. I would suggest adding the default dimensions on the transfer order form. Then users would be able to see and control which value should be used for posting. The posting logic will create InventTransPosting records and a LedgerVoucher object as part of the posting process. At that moment, you can try to control the default dimensions. You can use the cross reference tool and/or the debugger to find the best place to hook into the coding.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Jonas ”Jones” Melgaard – Community Spotlight

We are honored to recognize Jonas "Jones" Melgaard as our April 2025…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 294,118 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 232,866 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,158 Moderator

Leaderboard

Product updates

Dynamics 365 release plans