Sell-to Customer Name

kwajahathydro
Member Posts: 88
Hi,
I would like to know on how to add the sell-to customer name field that appears in table 112 (sales invoice header) to be shown into the customer ledger entry screen.
I would like to capture this field into customer ledger entry table for new records as well as for old records. I did inserted a new field in customer ledger entry table as 50003, Sell-to Customer Name with type as code & length 50
I wrote a new report for the data item cust ledger entry and on validate trigger, i wrote this code
IF R_SalesInvoiceHeader.GET("Sell-to Customer Name") THEN
BEGIN
"Cust. Ledger Entry"."Sell-to Customer Name":=R_SalesInvoiceHeader."Sell-to Customer Name";
MODIFY(TRUE);
END;
Under CAL Globals, I defined the variable as R_SalesInvoiceHeader, with type as record and pointed it to Sales Invoice Header Table.
I run the report and there is no error but after this when i look at customer ledger entry screen, the field Sell-to Customer Name appears but no value to it.
I need some help on the above!
Regards
Khan
I would like to know on how to add the sell-to customer name field that appears in table 112 (sales invoice header) to be shown into the customer ledger entry screen.
I would like to capture this field into customer ledger entry table for new records as well as for old records. I did inserted a new field in customer ledger entry table as 50003, Sell-to Customer Name with type as code & length 50
I wrote a new report for the data item cust ledger entry and on validate trigger, i wrote this code
IF R_SalesInvoiceHeader.GET("Sell-to Customer Name") THEN
BEGIN
"Cust. Ledger Entry"."Sell-to Customer Name":=R_SalesInvoiceHeader."Sell-to Customer Name";
MODIFY(TRUE);
END;
Under CAL Globals, I defined the variable as R_SalesInvoiceHeader, with type as record and pointed it to Sales Invoice Header Table.
I run the report and there is no error but after this when i look at customer ledger entry screen, the field Sell-to Customer Name appears but no value to it.
I need some help on the above!
Regards
Khan
0
Comments
-
Read this post to know about how to use GET
http://www.mibuso.com/forum/viewtopic.php?f=23&t=51996
Why do you want to insert data..Why dont you use a FlowField?0 -
Hi,
I am not a techie in Nav, so can you give me the steps or write down for me if you have time on how to use flow field, for which table and etc
This code was given to me by my colleague so I used it after long time, never did it but today the need was there so I have use it. Well I want the sell to customer name that is sitting in posted invoice header table to be displayed in customer ledger entry. Now if flowfield can help me its fine and at same time i want all the old records in the customer ledger entry to be captured with its customer name rather than only new ones getting captured.
pls help me out by writing the details to me, I hope you dont mind
Regards
Khan0 -
Please dont try yourself with this kind of code where you dont know the effect of it..
Select Properties of New Created field in Customer Ledger Entry and
Set FieldClass = FlowField
CalcFormula = Lookup("Sales Invoice Header"."Sell-to Customer Name" WHERE (No.=FIELD(Document No.)))0 -
You can also go through by "G/L Account Name" field in G/L Entry table.0
-
Hi Mohana,
Thanks for your help. It worked! Well What ever i do, i do in my test DB without effecting my live. Once confirmed I do it in Live. Any how thanks for the tip on not to do things when we are not sure of it.
Regards
Khan0 -
Hi Mohana,
In customer ledger entry, document type for invoice only it shows cust name, but how about if i need to show the name for the document type credit note
I hope if its simple pls let me know the areas where to go and add what kind of code, dont worry! I will do it in my test DB and once assured I shall upload it into the live DB
Hope you dont mind
Regards
Khan0 -
You have to try your self also...
As vijay suggested use g/lAccount Name example..
Use Customer table to get the customer name instead of Sales Invoice header..0 -
mohana_cse06 wrote:Please dont try yourself with this kind of code where you dont know the effect of it..
Select Properties of New Created field in Customer Ledger Entry and
Set FieldClass = FlowField
CalcFormula = Lookup("Sales Invoice Header"."Sell-to Customer Name" WHERE (No.=FIELD(Document No.)))
Flowfield can have performance issue especially if the data size is huge. I suggest consult a technical consultant to do the appropriate coding for you.CA Sandeep Singla
http://ssdynamics.co.in0 -
When we use Lookup method in flowfield then i don't think it will impect to DB performance even it does not required any key to show the value.
If the purpose of this field is to display only.0 -
Please dont try yourself with this kind of code where you dont know the effect of it..
Select Properties of New Created field in Customer Ledger Entry and
Set FieldClass = FlowField
CalcFormula = Lookup("Sales Invoice Header"."Sell-to Customer Name" WHERE (No.=FIELD(Document No.)))
I think it would make more sense to create the flowfield like this:
Select Properties of New Created field in Customer Ledger Entry and
Set FieldClass = FlowField
CalcFormula = Lookup(Customer.Name WHERE (No.=FIELD(Customer No.)))
As all Customer Names will be filled out for the CLE's and not only the ones that have Sales Invoice Headers...0 -
Thanxx a lottt Tvis.. it has helped me to solve a problem in which i was stuck since many days. Next time i ll use FlowField instead of inserting.
=D>
0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions