Open a Page working with FieldRef and RecordRef

gonzy1981gonzy1981 Member Posts: 156
Hi, i've in a record some fields:
"Table No.",
"Field No.",
"Page No.",
"Value"
and more fields, less important


Firstly i need to look for a table with this id: Rec."Table No." later in the field (Rec."Field No.") the value (Rec.Value).
If i find a record, i'll have to open a Page with the record.

But I'm having a problem because i can't transform the value Var_RecRec to a NewRec to open our Page with his record.

Var_RecRef.OPEN(Rec."Table no.");
Var_FieRef := Var_RecRef.FIELD(Rec."Field no.");
Var_FieRef.SETRANGE(Rec.Value);
Var_RecRef.FINDFIRST;

PAGE.RUN(Rec."Page no.",NewRec);

Can you help me????

Comments

  • BeliasBelias Member Posts: 2,998
    after
    Var_RecRef.FINDFIRST;
    
    use
    NewRec.getposition(Var_RecRef.SETPOSITION);
    
    or viceversa :whistle:

    P.S.: you may be interested also in this:
    from the F1 help of nav2009, search "FORMAT(CustomerRecRef.RECORDID,0,10)" and check the only topic available
    -Mirko-
    "Never memorize what you can easily find in a book".....Or Mibuso
    My Blog
  • gonzy1981gonzy1981 Member Posts: 156
    But how i declare the NewRecord???

    Because i don't know which record it is.
  • BeliasBelias Member Posts: 2,998
    #-o what a fool i am...btw, sorry, but you can't declare the variable at runtime, you have to make a big "case" statement
    -Mirko-
    "Never memorize what you can easily find in a book".....Or Mibuso
    My Blog
Sign In or Register to comment.