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)

AIF ProjectHourJournalService Document Service

(0) ShareShare
ReportReport
Posted on by 2

Has anyone successfully managed to create a project hour journal using the standard AX document service?

I'm having various problems, including AIF complaining that the VoucherNumberSequenceTable is invalid and AIF complaining that the Worker is invalid, despite the ID of the worker being correct.

Just curious if anyone has used this service correctly, if so is there any example code out there!?

Thanks,

Nick

*This post is locked for comments

I have the same question (0)
  • Liz Herrington Profile Picture
    265 on at

    Nick,

    Did you ever figure this out?  We are experiencing the same issue.  Thanks, Liz

  • NR-11010513-0 Profile Picture
    2 on at

    Hi Liz,

    I did manage to succesfully post hour journals through the document service. I believe when I was getting the error, I was using the Party 'RecID' of the Worker instead of the 'PartyNumber'. The document service has a concept of 'expanding foreign surrogate keys' whereby the document service will look for the replacement key of the table, in this instance PartyNumber is the replacement key of DirPartyTable.

    What is the issue you are getting exactly? The errors in the AIF exception log can sometimes be a bit misleading.

    Cheers,

    Nick

  • NR-11010513-0 Profile Picture
    2 on at

    Check this link out, explains it slightly better than I did:

    community.dynamics.com/.../surrogate-foreign-keys-in-aif.aspx

  • Liz Herrington Profile Picture
    265 on at

    Thanks so much Nick!  Do you have some sample code from your import?  We are getting a lot of errors surrounding the Number Sequence:

    Invalid document schema. The following error was returned:  The element 'ProjJournalTable' in namespace 'schemas.microsoft.com/.../ProjJournalTable& has invalid child element 'Worker' in namespace 'schemas.microsoft.com/.../ProjJournalTable&. List of possible elements expected: 'VoucherNumberSequenceTable' in namespace 'schemas.microsoft.com/.../ProjJournalTable&.

    We added a bunch of number sequence information, but I don't think that should be necessary.

  • NR-11010513-0 Profile Picture
    2 on at

    You need to ensure the AxdEntity_ProjJournalTable.VoucherNumberSequenceTable property is populated.

    This requires a AxdEntityKey_NumberSequenceTable object is created with values for the number sequence scope.

    I'd be interested if you get anywhere with this. I too have had problems with this. It looks as though when it retrieves the surrogate key for the number sequence table, the underlying query it uses is performing inner joins across the tables related to the NumberSequenceScope table.

    I can see the service failing when I debug the AxdBaseCreate.getSurrogateForeignKeyValue() method at the point it attempts to retrieve the surrogate key for the property VoucherNumberSequenceTable.

    Hope that makes sense!

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
Sagar Suman Profile Picture

Sagar Suman 2 Super User 2026 Season 1

#2
Alexey Lekanov Profile Picture

Alexey Lekanov 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans