Options

Lookup form in Dataport

hawwahawwa Member Posts: 106
Is it possible to call a Lookup Form from the Request Form in a Dataport. For example, I want to allow user select the Jornal Batch Name in the Request From in dataport. Is it possible for me to do a lookup to Form 251 - General Journal batches in the Request Form in Dataport.

Thanks

Comments

  • Options
    ara3nara3n Member Posts: 9,255
    yes it is. :)
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
  • Options
    hawwahawwa Member Posts: 106
    Hi Ara3n,

    Can you please let me how to do it.
    I have a dataport that will import data into Gen. Journal Line table. But before the import begin, I want to allow user to select the Journal Batch Name.

    I tried to create a textbox at the request form and set the SourceExpr to "Gen. Journal Line"."Journal Barch Name" but it is not working.

    Thank you very much
  • Options
    tguptatgupta Member Posts: 86
    Hi Hawwa,
    Not to hard you can do something like this on the Onlookup Trigger

    GenBatches.RESET;
    GenBatches.SETRANGE(GenBatches."Journal Template Name",GenTemplateName);
    CLEAR(FrmGenBatches);
    FrmGenBatches.SETTABLEVIEW(GenBatches);
    FrmGenBatches.LOOKUPMODE:=TRUE;
    IF FrmGenBatches.RUNMODAL = ACTION::LookupOK THEN BEGIN
    FrmGenBatches.GETRECORD(GenBatches);
    GenBatchName := GenBatches.Name;
    END;

    Where GenBatchName = Code
    FrmGenBatches = Form = General Journal Batches
    GenBatches = Record= Gen. Journal Batch


    Cheers,
    Tarun
  • Options
    hawwahawwa Member Posts: 106
    Hi Tarun,

    the code is put in the OnLookup trigger of which control ?

    Thank you
  • Options
    tguptatgupta Member Posts: 86
    Hi Hawwa,
    On the lookup of the Generalbatch.For the template u dont need any code just the table relation .Hope that helps and i assume u understand why the code is like that bcoz of the fact all journal batches are created based on the journal templates . So for one particluar template u will have as many batches u want .

    Regards,
    tarun
Sign In or Register to comment.