Options

Updating Posting Date in DB

sakameeransakameeran Member Posts: 52
Hi Experts,
I m New to NAV.
I want to update the posting date in General Journal Form by click one user defined button.
I mean, while the user defined button,
I wanted to update the posting Date for the particular batch.
Example,
"Posting Date" :=DMY2DATE(12,3,2009);
I tried the above statement in Button Clicking Event (Push Trigger). but it is updating only the current row, in which the cursor was there.
I want to update the date for whole batch.
Is that possible? Please help me on this
Thanks in advance

Comments

  • Options
    crisnicolascrisnicolas Member Posts: 177
    You should loop through all the records to do that.
  • Options
    sakameeransakameeran Member Posts: 52
    could you please Guide me on tht?
    Since i m very new to NAV, i dont knw how to loop it?
    Thanks in Advance.
    You should loop through all the records to do that.
  • Options
    bbrownbbrown Member Posts: 3,268
    MODIFYALL("Posting Date" , NewDate);
    CurrForm.UPDATE;
    There are no bugs - only undocumented features.
  • Options
    crisnicolascrisnicolas Member Posts: 177
    On the doc file of the NAV DVD you'll find a pdf called adgw1w1 (the Application Designer Guide).
    In there you'll find all the statements used on C/AL and some examples.

    Looping can be done using a REPEAT...UNTIL statement, a WHILE statement or a FOR..TO..DO statement.
    You should read this document before trying to do any code modifications on NAV.
  • Options
    sakameeransakameeran Member Posts: 52
    Thank a lot Mr. Brown.
    bbrown wrote:
    MODIFYALL("Posting Date" , NewDate);
    CurrForm.UPDATE;
  • Options
    jannestigjannestig Member Posts: 999
    You could also just use CTRL-H if you are updating an unposted journal,

    User would just filter for the lines they want and then find and replace on the date field
Sign In or Register to comment.