Dimension ledger entry: Stuck with it

txerifftxeriff Member Posts: 500
Hi,

Could any1 help me how to create entries here? I have tried all functions I found everywhere but they seem not working.

thanks

Answers

  • neilgfneilgf Member Posts: 148
    Hi
    When you say tried all functions, do you mean assigned dimensions to unposted documents / journals but nothing is posting when each document / journal is posted?
    Neil
  • txerifftxeriff Member Posts: 500
    edited 2016-01-25
    neilgf wrote: »
    Hi
    When you say tried all functions, do you mean assigned dimensions to unposted documents / journals but nothing is posting when each document / journal is posted?
    Neil

    Hi neilgf,

    thanks for answering. I would need to copy dimensions from a custom table and create dimension ledger entries. I have tried several ways. I know there is a function in T81 but I don´t think is usefull for me


    CreateDim(
    DimMgt.TypeToTableID1("Account Type"),"Account No.",
    DimMgt.TypeToTableID1("Bal. Account Type"),"Bal. Account No.",
    DATABASE::Job,"Job No.",
    DATABASE::"Salesperson/Purchaser","Salespers./Purch. Code",
    DATABASE::Campaign,"Campaign No.");


    I dont understand why it sends tables and values. In my case I would need something like (jobLineDimension its a custom table):


    dimensionsetentry.init;
    DimensionSetEntry."Dimension Code":=JobLineDimension."Dimension Code";
    DimensionSetEntry."Dimension Value Code":=JobLineDimension."Dimension Value Code";
    DimensionSetEntry.INSERT(TRUE);



    I have tried the following but I guess it needs default dimension or whatever, it does nothing:
    GenJournal.CreateDim(DATABASE::"PR - Job Line Dimension",JobLineDimension."Dimension Code",0,'',0,'',0,'',0,'');

    thanks a lot!
  • vaprogvaprog Member Posts: 1,140
    Hi txeriff

    You're not supposed to alter table "Dimension Set Entry" yourself. Consider this private data to it's global function(s) and the the DimensionManagement Codeunit.

    The only way you should ever use to add to this table is
    "Dimension Set Entry".GetDimensionSetID(VAR DimSetEntry : Record "Dimension Set Entry") : Integer
    

    This table needs to be in sync with table "Dimension Set Tree Node". Above function takes care of this.
  • txerifftxeriff Member Posts: 500
    vaprog wrote: »
    Hi txeriff

    You're not supposed to alter table "Dimension Set Entry" yourself. Consider this private data to it's global function(s) and the the DimensionManagement Codeunit.

    The only way you should ever use to add to this table is
    "Dimension Set Entry".GetDimensionSetID(VAR DimSetEntry : Record "Dimension Set Entry") : Integer
    

    This table needs to be in sync with table "Dimension Set Tree Node". Above function takes care of this.

    thanks

    finally we managed to solve it with another custom functions for other tasks. I know this is not easy... anyway, thanks for your help
Sign In or Register to comment.