NEXT(-1) not working on page

thijshensthijshens Member Posts: 15
edited 2012-06-06 in NAV Three Tier
Hi there,

I have this page where I have 4 action buttons:
First, Previous, Next and Last.
Code is as following:
FINDFIRST();
NEXT(-1);
NEXT();
FINDLAST();

Only thing is that NEXT(-1) is not working. When i press it, nothing is happening.
Anyone has a clue why, or ever seen this before?

Best regards,

Thijs

Comments

  • krikikriki Member, Moderator Posts: 9,112
    Could it be that you are already on the first record?
    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!


  • thijshensthijshens Member Posts: 15
    kriki wrote:
    Could it be that you are already on the first record?
    Haha, no that is not the thing.
    It works with SendKey, but a lot slower.
  • EgnazEgnaz Member Posts: 111
    Looks strange. Seems to be a bug in converting to C# for RTC/Service Tier.

    A workaround could be to switch the sorting order.
    For example:
    ASCENDING(FALSE);
    NEXT(1);
    ASCENDING(TRUE);
    

    Greets
    Egnaz
  • MatteoMatteo Member Posts: 2
    Hello all,
    instead I've used this code to solve this issue
    xRec := Rec;
    xRec.NEXT(-1);
    Rec := xRec;
    
  • EgnazEgnaz Member Posts: 111
    After some additional testing I think it's not the -1 operator in C#. The record didn't get an update but I found no reason why.

    Matteos solutions works as well but there is also a manual update of rec included.
    So NEXT(1) updates the rec but NEXT(-1) misses the update.
  • MatteoMatteo Member Posts: 2
    Egnaz wrote:
    [...]but there is also a manual update of rec included.
    So NEXT(1) updates the rec but NEXT(-1) misses the update.

    Yes it's true.
    I forgot to mention this point.
    Thanks Egnaz for your clarification.
  • thijshensthijshens Member Posts: 15
    Thanks all for you respond.
    We tried exact the same code in several pages, but all work fine.

    We decided to notice this Issue to Microsoft, so we are awaiting their answer.

    Thanks!
Sign In or Register to comment.