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

Notifications

Announcements

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
    301,482 Super User 2025 Season 2 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
    301,482 Super User 2025 Season 2 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,755 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

News and Announcements

Season of Giving Solutions is Here!

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#2
TAHER Mehdi Profile Picture

TAHER Mehdi 3

#3
Nakul Profile Picture

Nakul 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans