Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics NAV (Archived)

Revaluation Journal

Posted on by Microsoft Employee

Client is doing revaluation, but some lines have a quanitity of ect. 255.000 but only want revaluate the remaining quanity of 71.020. How do I do this? They have quite many lines since I revaluate for the last year. So would prefer something that can be automaticly.

imperial.PNG

I have written the code for inserting the lines in the Revaluation Journal so there is alot and would be hard to find the ones I need to adjust.

TempItem.FIND('-');
REPEAT
  CLEAR(ItemLedgerEntry);
  ItemLedgerEntry.SETRANGE("Item No.", TempItem."No.");
  ItemLedgerEntry.SETRANGE(Open, TRUE);
  IF ItemLedgerEntry.FIND('-') THEN
  REPEAT 
      LineNo += 1;
      //CurrentJnlBatchName := 'CHO';
      ItemJournalLine.INIT;
      ItemJournalLine.VALIDATE("Value Entry Type",ItemJournalLine."Value Entry Type"::Revaluation);
      ItemJournalLine.VALIDATE("Source Code",'VÆRDIRGKLD');
      ItemJournalLine."Journal Template Name" := 'VÆRDIREGUL';
      ItemJournalLine."Journal Batch Name" := 'CHO';
      ItemJournalLine."Line No." := LineNo;
      ItemJournalLine.VALIDATE("Document No.",'REG2016');
      ItemJournalLine.VALIDATE("Item No.",ItemLedgerEntry."Item No.");
      ItemJournalLine.VALIDATE("Applies-to Entry",ItemLedgerEntry."Entry No.");
      ItemJournalLine.VALIDATE("Unit Cost (Revalued)", TempItem."Unit Price");
      ItemJournalLine."Posting Date" := TODAY;
      ItemJournalLine.INSERT(TRUE);

  UNTIL ItemLedgerEntry.NEXT = 0;
UNTIL TempItem.NEXT = 0;

MESSAGE('Finnished');


*This post is locked for comments

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Revaluation Journal

    Amol Salvi, I understand now. I will try it out. Thanks.

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Revaluation Journal

    I have made my Revaluation Journal, but if you look at the line from the screenshot. It have a total of 255.000 qauntity, but i only want to revaluate the remaining quantity of 71.020.

  • Verified answer
    Amol Salvi Profile Picture
    Amol Salvi 18,694 on at
    RE: Revaluation Journal

    Hi

    You can do this by using Calculate Inventory value function on Revaluation Journal rather than writing a customized program

    Look at this link

    msdn.microsoft.com/.../hh168013(v=nav.70).aspx

    Check this video also

    www.youtube.com/watch

  • Suggested answer
    IshwarSharma Profile Picture
    IshwarSharma 729 on at
    RE: Revaluation Journal

    I suggest that you must also add code to validate quantity after validating Item No.,

    ItemJournalLine.VALIDATE(Quantity,ItemLedgerEntry."Remaining Quantity");

    I haven't tried it out but I Hope it helps.

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,235 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans