Options

Same code working on form but not in table.........!!!

vijay_gvijay_g Member Posts: 884
hi,
//Customizefield onlookup trigger of Table
RecVend.CHANGECOMPNAY(Company2);
if Form.Runmodal(0,RecVend) = Action::LookUpOk then
   Customizefield := RecVend."No.";
when i try to lookup in table it's lookup but if i want to capture selected record no. then not able but when i try to lookup same in form(based on same table) to the same field then it's successfully lookup and able to get value.

what's happening..

Comments

  • Options
    ShonatinaShonatina Member Posts: 114
    hiya..

    where hav you written your codes in? table or forms?
    smile always
    shona
    That which you seek inside is that which you find outside
  • Options
    ShonatinaShonatina Member Posts: 114
    vijay_g wrote:
    hi,
    but if i want to capture selected record no. then not able
    ..

    what do you exactly mean by selected rec no? that you wil select few in random from the rec? if so then there is a properity called Mark. try that
    smile always
    shona
    That which you seek inside is that which you find outside
  • Options
    vijay_gvijay_g Member Posts: 884
    through some ideas on this....
  • Options
    vijay_gvijay_g Member Posts: 884
    have a look please....
  • Options
    kinekine Member Posts: 12,562
    Some things are working or not working when running directly from designer. Do not "test" your code by running the table directly, user will never do that...
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • Options
    ZephyrZephyr Member Posts: 110
    Kine, User will require this or not, it's not point here. The point is that same code is working for form but not for table. Is something missing from code perspective or something bug in Navision for tables. #-o
    Zephyr
  • Options
    kinekine Member Posts: 12,562
    Question is - if the code is on table, how you are testing it? By running the table from designer and trying the lookup? If yes, it worked in this way by design, it is same like running dataport from designer (it will not commit the transaction). If you run the lookup defined on table through some form, it will work. Main point is to test the functionality by running form and not table directly...
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • Options
    ZephyrZephyr Member Posts: 110
    =D> okk ... thanks kine
    Zephyr
Sign In or Register to comment.