Skip to main content

Notifications

Finance | Project Operations, Human Resources, ...
Suggested answer

What is link between inventsettlement table with main account table

Posted on by 195

Hello experts,

 can any  1 hlp me out,

I want to link inventsettlement table  with  main account table in ax 2012

  • pradeep M B Profile Picture
    pradeep M B 195 on at
    RE: What is link between inventsettlement table with main account table

    I have used  the follwing code.

    /* main

       [

       SysEntryPointAttribute(false)

       ]

               public void processReport()

               {

                   SintoPInventAdjustcontract Contract;

                   Contract = this.parmDataContract() as SintoPInventAdjustcontract;

                  voucher=Contract.Parmvoucher();

                  // mainAccountNum=Contract.ParmMainAccountNum();

                       if(voucher!="")

                       {

                          while select * from  inventSettlement

                              join inventTransOrigin

                              order by inventSettlement.ItemId

                                   where  inventSettlement.Voucher == voucher

                                  // && inventSettlement.OperationsLedgerDimension==dimensionAttributeValueCombination.RecId

                                     && inventTransOrigin.InventTransId == inventSettlement.InventTransId

                                        {

                                           this.insert(InventSettlement);

                                        }

                        }

    /*insert

    private void Insert(InventSettlement    ObjInventSettlement)

    {

          select * from dimensionAttributeValueSetItem

               join dimensionattribute

               join DimensionAttributeValue

               join dimensionAttributeValueCombination

               join MainAccount

               where dimensionattribute.RecId == DimensionAttributeValue.DimensionAttribute &&

               DimensionAttributeValue.RecId == dimensionAttributeValueSetItem.DimensionAttributeValue &&

               dimensionAttributeValueSetItem.DimensionAttributeValueSet == ObjInventSettlement.DefaultDimension &&

               dimensionAttributeValueCombination.RecId == ObjInventSettlement.OperationsLedgerDimension

                 && dimensionattribute.Name == "Project";

                   {

                      // if(dimensionattribute.Name == "Project")

                       {

                          // select * from ProjTable

                           //where ProjTable.ProjId == dimensionAttributeValueSetItem.DisplayValue;

                           sintoinventsumtmp.Project = dimensionAttributeValueSetItem.DisplayValue;

                           //sintoinventsumtmp.LedgerAccount =ObjInventSettlement.OperationsLedgerDimension;

                       }

                    }

             //    select * from inventTransOrigin

               // join ObjInventSettlement

               //  where inventTransOrigin.InventTransId ==ObjInventSettlement.InventTransId;

                 sintoinventsumtmp.VoucherNo=ObjInventSettlement.Voucher;

                 sintoinventsumtmp.Date=ObjInventSettlement.TransDate;

               // sintoPInventoryTmp.ItemId=ledgerjournaltran

                 sintoinventsumtmp.BasicValueAmount=ObjInventSettlement.CostAmountAdjustment;

                 sintoinventsumtmp.ItemId=ObjInventSettlement.ItemId;

                 sintoinventsumtmp.ReferenceId=inventTransOrigin.ReferenceId;

                //sintoinventsumtmp.LedgerAccount =

                 sintoinventsumtmp.LedgerAccount=generalJournalAccountEntry.LedgerAccount;

                // sintoPInventoryTmp.ItemId=inventSettlement.ItemId;

                   sintoinventsumtmp.Insert();

    }

  • pradeep M B Profile Picture
    pradeep M B 195 on at
    RE: What is link between inventsettlement table with main account table

    Because i want to display GL code in the report .

    Regards,

    Pradeep

  • Ludwig Reinhard Profile Picture
    Ludwig Reinhard Microsoft Employee on at
    RE: What is link between inventsettlement table with main account table

    Hi pradeep M B,

    Inventory transactions are summarizes in the GL vouchers.

    Why is it that you are looking out for this linkage?

    What do you try to achieve ultimately?

    Best regards,

    Ludwig

  • pradeep M B Profile Picture
    pradeep M B 195 on at
    RE: What is link between inventsettlement table with main account table

    Sir Can u write the code  and send me plses

    regards,

    pradeep

  • Suggested answer
    Satish Panwar Profile Picture
    Satish Panwar 14,645 on at
    RE: What is link between inventsettlement table with main account table

    If you look at relations on inventSettlement table, that will give you desired information.

    pastedimage1574834662692v1.png

    the DIMENSIONATTRIBUTEVALUECOMBINATION table provides you the main account in DisplayValue.

    See AOT relations (screenshot from D365FO but you should similar in AX2012 as well).

    pastedimage1574834718647v2.png

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,253 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,188 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans