web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Import GL on voucher for invoice through X++

(0) ShareShare
ReportReport
Posted on by 405

Hi,

In my offset account don't have any dimension setup only i have main account for ledger account .

i follow this blog for reference http://imdaxershiv.blogspot.in/2016/05/x-code-to-create-periodic-journal-with.html  I have doubt without dimension can we insert main account in offset account .

It will be helpful if someone can provide inputs for same.

Thanks!!

Regards,

shubham

*This post is locked for comments

I have the same question (0)
  • André Arnaud de Calavon Profile Picture
    303,669 Super User 2026 Season 1 on at

    Hi Shubham,

    It is possible to have only the main account as offset. Where exactly do you need help? Did you already try to use similar coding and adjust it to your needs?

  • shubhi gupta Profile Picture
    405 on at

    Hi Andre,

    Showing this error: Financial dimension 0 does not exist.

    when I am using this code only

    cont1+=['MainAccount',6040020,2];

    offsetledgerDim=AxdDimensionUtil::getLedgerAccountId(cont1);

    not using any dimension setup.

  • Verified answer
    André Arnaud de Calavon Profile Picture
    303,669 Super User 2026 Season 1 on at

    Hi Shubhi,

    I have quickly looked at the coding and tried to follow the blogger. I do think the part you are using is intended to use with dimensions. There is a statement in the example evaluating if the outcome was 0. In that case try to use:

    cont1 = ['6040020','6040020'];

     offsetledgerDim = AxdDimensionUtil::getLedgerAccountId(cont1);

    I haven't tested/verified it myself; only tried to get it out of the blog example.

  • Verified answer
    Ajit Profile Picture
    8,788 on at

    Here 2 in parameter means, you will have 2 dimensions along with your main account. As you don't want dimensions, do not put any parameter there.

  • shubhi gupta Profile Picture
    405 on at

    Thanks Andre or Sukrut ,Its work.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Joris dG Profile Picture

Joris dG 5

#2
Alexey Lekanov Profile Picture

Alexey Lekanov 2

#2
Henrik Nordlöf Profile Picture

Henrik Nordlöf 2 User Group Leader

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans