Options

Show the flow field in another table

vyankuvyanku Member Posts: 791
If we want to get the value of balance filed of perticular vendor from vendor table in new table
how can we get that value?
When I try it shows me error " balance must be in primary key in vendor table" but balance is the flow field and flow filed will not become a primary key.

Answers

  • Options
    ssinglassingla Member Posts: 2,973
    You can use the vendor ledger entry for the flow field.
    CA Sandeep Singla
    http://ssdynamics.co.in
  • Options
    vyankuvyanku Member Posts: 791
    I tried that also
    I just want to get the value of Amount field in the new table for specific vendor.
    It show me error
    "The field below must be included i tables primary key"
    Field :- amount
    Table :- Vendor ledger entry
  • Options
    kinekine Member Posts: 12,562
    You need to create own C/AL code into "OnLookup" trigger. You cannot use the TableRelation for that.
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • Options
    ssinglassingla Member Posts: 2,973
    It show me error
    "The field below must be included i tables primary key"
    Field :- amount
    Table :- Vendor ledger entry
    :oops:
    You need to use Detailed Vendor Ledger Entry.

    Kine Wrote
    You need to create own C/AL code into "OnLookup" trigger. You cannot use the TableRelation for that.
    I tried to define a flow field in Purchase Header table with relation to "Buy from Vendor No." field by using the detailed vend ledger entry table and it worked. Why to write the C/AL code :-k
    CA Sandeep Singla
    http://ssdynamics.co.in
  • Options
    kinekine Member Posts: 12,562
    Because I thought that you want to select the value and enter it into some field... it was my misunderstanding... :whistle:
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • Options
    vyankuvyanku Member Posts: 791
    edited 2007-01-23
    Actually my problem is
    I create a new table having fileds vendor no. and balance
    Now what I want, when I insert vendor no. in first field it will takes a balance/amount of that vendor automatically in 2nd field.
    Please tell me what can I do?
  • Options
    ssinglassingla Member Posts: 2,973
    Mark Solved on the Topic if issue resolved
    CA Sandeep Singla
    http://ssdynamics.co.in
  • Options
    vyankuvyanku Member Posts: 791
    Actually my problem is
    I create a new table having fileds vendor no. and balance
    Now what I want, when I insert vendor no. in first field it will takes a balance/amount of that vendor automatically in 2nd field.
    Please tell me what can I do?

    Sorry but I am not able to solve the problem
  • Options
    ssinglassingla Member Posts: 2,973
    Define the balance field properties as such:

    Field Class : FlowField
    CalcFormula : Sum("Detailed Vendor Ledg. Entry".Amount WHERE (Vendor No.=FIELD(Customized Table vendor field)))

    I hope this will solve the problem.
    CA Sandeep Singla
    http://ssdynamics.co.in
  • Options
    vyankuvyanku Member Posts: 791
    Thanks ,
    This solution solved my problem \:D/ :P :whistle:
Sign In or Register to comment.