Transfer Value boolean field from one table to another table
gpj
Posts: 4
Hi There,
I want to transfer the value of a boolean field from the ItemTable to the same boolean field in the SalesLineTable.
(Fieldnumbers are different in both tables)
For instance: when I insert a line in the SalesLineTable it should transfer the value from the Itemtable to the SalesLineTable.
I Put the following code In the OnInsert section in the SalesLineTable:
What am i doing wrong ?
I appreciate your help.
I want to transfer the value of a boolean field from the ItemTable to the same boolean field in the SalesLineTable.
(Fieldnumbers are different in both tables)
For instance: when I insert a line in the SalesLineTable it should transfer the value from the Itemtable to the SalesLineTable.
I Put the following code In the OnInsert section in the SalesLineTable:
IF Item.GET("No.") THEN
SalesLineTable.Fieldname := ItemTable.Fieldname;
What am i doing wrong ?
I appreciate your help.
0
Answers
-
Is it a typo?
IF Item.GET("No.") THEN
SalesLineTable.Fieldname := ItemTable.Fieldname;
IF Item.GET("No.") THEN
SalesLineTable.Fieldname := Item.Fieldname;0 -
kapamarou,
Thanks for your reply.
I allready found out what went wrong.
After i confirmed the line in the salesline table (arrow down) the value was tranferred correctly.
Thanks anyway.0 -
it's even easier then that. if you look on the onaftervalidate of the "no" field and scrolldown thru the code you will see a number of fields from the item table being transfered ie/description. add your one line of code there. no if get needed.0
-
Ok Harry,
I also tried your suggestion and I must say this works better then my code.
I 'll do it your way !
Thank you too...0
Categories
- All Categories
- 75 General
- 75 Announcements
- 66.7K Microsoft Dynamics NAV
- 18.8K 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
- 611 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 253 Dynamics CRM
- 103 Dynamics GP
- 6 Dynamics SL
- 1.5K Other
- 991 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 28 Design Patterns (General & Best Practices)
- Architectural Patterns
- 9 Design Patterns
- 4 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1K General Chat
- 1.6K Website
- 77 Testing
- 1.2K Download section
- 23 How Tos section
- 249 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions