item card new column add can't find in sales invoice forum

bsakareem
Member Posts: 4
In nav 5.0 item card table i have added hsncode new column, but it's can't in the new columne under field colums of sales invoice form. Please advise how to add in sale invoice form.
0
Answers
-
Hi,
If you want your new field 'hsncode' to be visible on your Sales invoice form, you have to add this new field in your sales header because 'sales header' is the base table of 'sales invoice' page.0 -
Adding to item card hsncode new field, will auto pick relevant hsncode when product is selected. how to link item hsncode to sale invoice form?0
-
Hi,
Ok your question was not clearly framed before. Now it is clear.
So your Hsncode has to be added in Itemtable and SalesLineTable too.
I believe you are entering the hsncode in Item table.
Now you have to link your sales line table and item table.
You can add below code in OnValidate trigger of your No. field of Sales Line table.
ItemTable.reset;
ItemTable.setrange(No.,SalesLineTable.No.);
If ItemTable.findfirst then begin
SalesLineTable.hsncode:=Itemtable.hsncode;
SalesLineTable.modify(true);
end;
0 -
Thanks for reply, but it's not retrieving the data from item card . i have added new fileds in both items and sales line. From item card menu i have insert the hsncode from product no. In sales invoice forum, added above code in No_ onvalidate trigger.0
-
Hi, there must be some issue in your code. Kindly post your code and the trigger under which you have written it.0
-
Hi,
If you have created fields in Item table and Sales line then
go to Sale Line table. Check for below code in on Validate() of No. Field
GetItem;
Item.TESTFIELD(Blocked,FALSE);
Item.TESTFIELD("Gen. Prod. Posting Group");
//New Code
HsnCode:=Item.hsncode;
// New Code
IF Item.Type = Item.Type::Inventory THEN BEGIN
Item.TESTFIELD("Inventory Posting Group");
"Posting Group" := Item."Inventory Posting Group";
END;
Description := Item.Description;
Regards,
Neeraj Singh0 -
Hi,
Is your issue resolved?
Alternatively in the OnValidate trigger of 'No' field of your sales line table and under the switch-case statement, under Type::Item:
you can retrieve your hsn code field value from Item table to your field value of sales line.
//The below two statements are already present.
Description := Item.Description;
"Description 2" := Item."Description 2";
//new code to be added
HsnCodeField :=Item.HsnCode;
where HsnCodeField is present in your sales line table and HsnCode is in Item table.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