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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Transfer journal Created By user id is not updating

(0) ShareShare
ReportReport
Posted on by 640

Hi All,

 When I create transfer journal header(excluding journal lines) through X++, the Created By field in the table InventJournalTable is not updating but, when I create transfer journal(including journal lines) through X++ the Created By field in the table InventJournalTable is updating. Does anybody knows about this?

Thanks in advance.

Kedar.

*This post is locked for comments

I have the same question (0)
  • Brandon Wiese Profile Picture
    17,788 on at

    Can you provide us your code?

  • Kedar Dande Profile Picture
    640 on at

    static void CreateTransferJournalHeader(Args _args)

    {

       InventDim                       inventDimLoc;

       InventLocation                  inventLocation;

       InventJournalTable              inventJournalTable;

       InventJournalTrans              inventJournalTrans;

       inventJournalTable.clear();

       inventJournalTable.JournalId        = NumberSeq::newGetNum(inventParameters::numRefInventJournalId()).num();

       inventJournalTable.JournalNameId    = "Transfer";

       inventJournalTable.initFromInventJournalName(InventJournalName::find(inventJournalTable.JournalNameId));

       inventJournalTable.Posted           = NoYes::No;

       inventJournalTable.JournalType      = InventJournalType::Transfer;

       InventJournalTable.Reservation      = ItemReservation::Automatic;

       inventJournalTable.Description      = "Transfer journal for sales orders cerated from web";

       inventJournalTable.insert();

    }

  • Verified answer
    Brandon Wiese Profile Picture
    17,788 on at

    You aren't doing anything unusual that would cause such strange behavior.  The CreatedBy and CreatedDateTime fields are systems fields and automatically updated by the system during almost all record activity.  You can override this behavior if you know how, but you're not doing it in that code block.

    I would be concerned based on what you've described that your AOS needs a restart, and perhaps even your AUC files cleared just to be safe.  You should definitely get a CreatedBy field populated on a simple .insert() like that.

  • Verified answer
    Sohaib Cheema Profile Picture
    49,438 User Group Leader on at

    it may be something with cache.

    you may give a try to

    1) synch these two tables or sync whole DB

    2) delete temp user files

    3) restart AOS

    retry

  • Kedar Dande Profile Picture
    640 on at

    Hi Brandon and Sohaib,

    I just restarted AOS and Deleted files from XppIL. It's working fine now.

    Thanks for your replies.

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

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
Priya_K Profile Picture

Priya_K 4

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#3
Ali Zaidi Profile Picture

Ali Zaidi 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans