Item Ledger Entry Table

kwajahathydrokwajahathydro Posts: 88Member
Hi,

In Item Ledger Entry table, there is a field called source name which displays customer name. But it is only doing for document type called as sales shipment. I did opened the Item Ledger Entry Table, look inside the table, there is a field called source name, with field no as 50100, when i look at its property, it shows me like this

Field Class is: Flow Field
Calc Formula is: Lookup("Sales Shipment Header"."Sell-to Customer Name" WHERE (Sell-to Customer No.=FIELD(Source No.),No.=FIELD(Document No.)))

now, in item ledger entry table, the document type sales credit note does not show any customer name in the source name, so how can change so that no matter what document type it is, navision should be able to show me the customer name in the source name filed for entry type SALE.

Pls help!

Regards
KH

Comments

  • mohana_cse06mohana_cse06 Posts: 5,468Member
    What did you try?

    It is pointing to Sales Shipment Header table in flowfield..did you try to change it to Customer table?
  • kwajahathydrokwajahathydro Posts: 88Member
    Hi Mohana,

    I didnt change anything, what ever i saw i did captured into my conversation and sent it across Mibuso for help. All I want is the source name to be shown for all document type (if sales shipment or sales credit note) when entry type is sale.

    Regards
    KH
  • mohana_cse06mohana_cse06 Posts: 5,468Member
    You just cant expect everything from Mibuso..you have to try something and let us know what didnt work..
  • kwajahathydrokwajahathydro Posts: 88Member
    Hi Mohana,

    Thanks for your comments, but before commenting you should know what background people come from! I am from Functional Background and this one is pertaining to technical thing so i posted whatever i came across. I thought I can get some help so i gave the complete picture, if even after looking at the picture if you tell me that its blur, then sorry man! i will wait for someone else to reply me

    Thanks

    KH
  • ChinmoyChinmoy Posts: 359Member
    We cannot write the code for you. However, you can ask someone in your technical team to change that lookup to the customer table as Mohana has suggested and check if that resolves the issue.
  • mohana_cse06mohana_cse06 Posts: 5,468Member
    It is pointing to Sales Shipment Header table in flowfield..did you try to change it to Customer table?
    I have already given solution to you..did you try this?

    You should ask technical help in your company not in forums..
  • kwajahathydrokwajahathydro Posts: 88Member
    Hi Mohana,

    thanks for your reply. well when you have good relationship with customer, you tend to do few things for FOC, if I ask my team they will ask me to give them a change request which will cost to my customer so i thought of posting it and getting it done in this site. Well let me try to change to the customer and see the result, dont worry i will do it in the test database

    Thanks

    KH
  • mohana_cse06mohana_cse06 Posts: 5,468Member
    Well let me try to change to the customer and see the result, dont worry i will do it in the test database
    :thumbsup:
  • kwajahathydrokwajahathydro Posts: 88Member
    Hi Mohana,

    I removed sales shipment header and put customer table name inside and did compile, it gave error. when look at customer table there is no field called as Sell-to Customer Name

    but can you tell me how to rewrite the new code! sorry dont know how to write the flow feild calc formula

    Regards
    KH
  • mohana_cse06mohana_cse06 Posts: 5,468Member
    You can try Lookup(Customer.Name WHERE (No.=FIELD(Source No.)))
    but this will show wrong name for vendor if you have same No. for both Customer and Vendor..
  • catiamatos1991catiamatos1991 Posts: 158Member
    what? can you ellaborate?
  • AlexDenAlexDen Posts: 49Member
    It's better to not use flowfield for this issue.
    Create new function on the page to calculate source name and use it as source expression instead of "Source Name" field:
    GetSourceName() : Text
    IF "Source No." = '' THEN
      EXIT('');
    
    CASE "Source Type" OF
      "Source Type"::Customer:
        IF Customer.GET("Source No.") THEN
          EXIT(Customer.Name);
      "Source Type"::Vendor:
        IF Vendor.GET("Source No.") THEN
          EXIT(Vendor.Name);
      "Source Type"::Item:
        IF Item.GET("Source No.") THEN
          EXIT(Item.Description);
    END;
    EXIT('');
    

    If you want to use FlowField than you have to copy text
    Lookup(Customer.Name WHERE (No.=FIELD(Source No.)))
    to the CalcFormula property of the "Source Name" field.

    It will work only for customers.
Sign In or Register to comment.