link b/w customer or vendor table with G/L entry table

mohamedkiyas
Member Posts: 10
Good day to all,
I am having a field in G/L entry table "vendor or customer name " which should be populated when "G/L acccount name" field is given as Vendor or customer.
So here is my exact Question i need to know the link between customer Or Vendor table with G/L entry table. once it populated in G/L entry table it should also updated in customer ledger entry and vendor ledger entry..Any Guidance is really helpful and appreciable.
Thanks in advance
I am having a field in G/L entry table "vendor or customer name " which should be populated when "G/L acccount name" field is given as Vendor or customer.
So here is my exact Question i need to know the link between customer Or Vendor table with G/L entry table. once it populated in G/L entry table it should also updated in customer ledger entry and vendor ledger entry..Any Guidance is really helpful and appreciable.
Thanks in advance
0
Best Answer
-
Mohamed,if you want just to have Cust/Vend Name viewed on the page, make a local functions for your page of G/L Entries:
LOCAL FindSourceName() : Text IF "Source No." = '' THEN EXIT(''); CASE "Source Type" OF "Source Type"::Vendor: BEGIN Vendor.GET("Source No."); EXIT(Vendor.Name); END; "Source Type"::Customer: BEGIN Customer.GET("Source No."); EXIT(Customer.Name); END; "Source Type"::"Bank Account": BEGIN BankAccount.GET("Source No."); EXIT(BankAccount.Name); END; "Source Type"::"Fixed Asset": BEGIN FixedAsset.GET("Source No."); EXIT(FixedAsset.Description); END; END;
If you want to fill your new created "Name" field in G/L Entry, make it during posting procedures, using, e.g. Event Subscription possibilities.
Regards,
Yury6
Answers
-
Hi, Mohamed
Use "Source Type"/"Source No." combination of "G/L Entry" to get a link.
Moreover, VLE and CLE are created before posting of Gen. Jnl. Line to GLE.Regards,
Yury1 -
Hi Yuri,
Thanks.
Yeah ,"Source Type/Source no." having customer and vendor details,but i need to populate the new field which i given in G/L entry table whether it is customer or vendor name.
0 -
Your approach is hard to understand, because Account Type and Balance Account Type. In my opinion you should rethink your model.1
-
Mohamed,if you want just to have Cust/Vend Name viewed on the page, make a local functions for your page of G/L Entries:
LOCAL FindSourceName() : Text IF "Source No." = '' THEN EXIT(''); CASE "Source Type" OF "Source Type"::Vendor: BEGIN Vendor.GET("Source No."); EXIT(Vendor.Name); END; "Source Type"::Customer: BEGIN Customer.GET("Source No."); EXIT(Customer.Name); END; "Source Type"::"Bank Account": BEGIN BankAccount.GET("Source No."); EXIT(BankAccount.Name); END; "Source Type"::"Fixed Asset": BEGIN FixedAsset.GET("Source No."); EXIT(FixedAsset.Description); END; END;
If you want to fill your new created "Name" field in G/L Entry, make it during posting procedures, using, e.g. Event Subscription possibilities.
Regards,
Yury6
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