How copy fields automatically

DarkHorse
Member Posts: 389
I've the field Purchaser code from the Vendor table and I've created the same field on the Item table. I want to copy the content of this field to the new field. I've crated a report filter by the DataItemlink "Vendor nº" and on AfterGetRecord of the Item DataItem I've put the code:
"Purchaser Code":=prove."Purchaser Code";
MODIFY;
("prove" is the Vendor table). It seems run but when I go to check the result it doesn't work, it appears empty. I don't know what's the problem; any idea?.
Thanks.
"Purchaser Code":=prove."Purchaser Code";
MODIFY;
("prove" is the Vendor table). It seems run but when I go to check the result it doesn't work, it appears empty. I don't know what's the problem; any idea?.
Thanks.
0
Comments
-
If Item Vendor No. is empty then DataItemlink is incorrect.
You shouldn't change DataItemlink in report0 -
Yes, there are Vendor Nº empty, but I don't know another better field to filter, how I can do it?.
Thanks.0 -
I think is missing some thing ....
If you can relate item to vendor, why write code again?0 -
Well, I think because I've to indicate what field I want to copy (purchase code);0
-
Any idea, please?
Thanks.0 -
If I understood correctly.
You have a report With 2 data items.
Vendor
--> Item
You have createt a new field in Item table, and you want to relate that new field with vendor table ?0 -
Yes, it is. I want to copy automatically the vendor field table to the new item field table.0
-
If that new field is blank, you can't relate it to Vendor table. That why I told you that is missing something,0
-
Then, It's impossible copy fields from a table to another?0
-
Hi Darkhorse,
Are you sure that the Purchaser Code for the Vendor is not blank?
Only 1 Vendor No. related to the specific Item(s)?
DataItemTableView of Item is set to Vendor No.
DataItemLinkReference is Set to Prove
DataItemLink is set No.=FIELD(Vendor No.)
If it is not filling the Purchase Code then there is no link between Prove."No." and Item."Vendor No."
Hope this helps.0 -
Thanks for answer. May be there are some blank Purchaser Code field in the Vendor table, but I try filter them. The rest I think is ok. I don't know what's the problem, it's strange.
Thanks for help.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