Go to a record without using 'Find'

Smashed_PumpkinSmashed_Pumpkin Member Posts: 47
edited 2004-07-26 in Navision Attain
Hi all,

What I'd like to be able to do is to go to the Sales Order form, scan a barcode that has a sales order (SO) number in it, then jump straight to that record. Is that possible? I know how to scan the barcode in and store the result in a variable, but how do I tell the Sales Order form to go to that record? Hope I'm making sense, and thanks in advance!

Gary

Comments

  • ikik Member Posts: 22
    use variables
    recSalesOrder : Table 36
    varBarCode : Code 20


    If I understood, you should use next operators in your module

    // **** begin **********
    recSalesOrder.SETCURRENTKEY("Document Type", "No.");
    IF recSalesOrder.GET(recSalesOrder."Document Type"::Order, varBarCode) THEN

    FORM.RUN(42, recSalesOrder)
    // or
    // FORM.RUNMODAL(42, recSalesOrder)

    ELSE
    MESSAGE('Wrong BarCode');

    // **** end **********

    So you can find order and open it.


    WBR.
Sign In or Register to comment.