Options

Impossible Flowfield

akmanakman Member Posts: 67
Hi. When I sell to customers I use the bill to customer no field, but on the customer card I want to be able to see a flowfield that sums the amounts of the entries wich have the customer as sell to customer.
In order to do that I can make a flowfield on the customer table which sums the customer ledger entries. The problem is that I have to activate a sell to custo no key on the cust ledger entry table with the amount (LCY) as sum index field. The amount(LCY) is a flowfiled and I can't put it as a sum index field.
Of course I can make the sell to flowfield on the det cust ledger entries table, but it won't work because I wll have to put this flowfield in a key.
Does anyone know how I can do this?

Answers

  • krikikriki Member, Moderator Posts: 9,120
    You can create a normal field "Sell-To Customer" in the detailed entries.
    In codeunit 12, you can fill it up and then you can make a SIFT-field on Amount to be used as flowfield on the customer-table.
    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!


  • David_CoxDavid_Cox Member Posts: 509
    This is something that has been on the wish list for over 10 years.

    The only way you can do it is by adding a field to the Detailed Customer Ledger entry, Sell-to Customer No.

    Then add a Key with the sumindexfields you want.
    Copy the flowfields on the customer to new numbers then change the Customer part to look at the new field.

    In Codeunit 12 Gen. Jnl.-Post Line add a line

    // Populate New Field
    DtldCVLedgEntryBuf."Sell-to Customer No." := "Sell-to/Buy-from No.";

    There maybe other places in codeunit 12 to do the same, have a look.

    Then you need to create a report, run through the Customer ledger entries find the detailed entries and update the new field, then test the different postings and applications etc:.

    This is another modification, index and sift index to maintain, so it might be better quicker and cleaner, just to add a key to Cust. Ledger Entry for "Sell-to Customer No." and just give them a report, on the customer ledger entry group totaled on the "Sell-to Customer No.".
    Analyst Developer with over 17 years Navision, Contract Status - Busy
    Mobile: +44(0)7854 842801
    Email: david.cox@adeptris.com
    Twitter: https://twitter.com/Adeptris
    Website: http://www.adeptris.com
  • MbadMbad Member Posts: 344
    David Cox wrote:
    // Populate New Field
    DtldCVLedgEntryBuf."Sell-to Customer No." := "Sell-to/Buy-from No.";

    You dont wanna do that.
  • David_CoxDavid_Cox Member Posts: 509
    Mbad wrote:
    David Cox wrote:
    // Populate New Field
    DtldCVLedgEntryBuf."Sell-to Customer No." := "Sell-to/Buy-from No.";

    You dont wanna do that.

    My answer was the same as kriki but with the process detailed! :lol:

    There is Only a "Customer No." (Bill-to) on the Detailed Entries at the moment and this ("Sell-to Customer No,") is a new field if you read my post, so there is no problem doing this! :D

    Just to make it clear, the new field would be on both the Detailed Customer Ledger, and the buffer table same number, then you populate it in the buffer as shown above and it is copied across in transferfields when it inserts the detailed ledger entry.
    Analyst Developer with over 17 years Navision, Contract Status - Busy
    Mobile: +44(0)7854 842801
    Email: david.cox@adeptris.com
    Twitter: https://twitter.com/Adeptris
    Website: http://www.adeptris.com
Sign In or Register to comment.