Check Inventory when Delete Item Variant

elTorito
Member Posts: 191
However is possible delete an Variant Code from an Item if them has Inventory <>0.
Which Function can I Call or Modify so before Delete, it checks if they are Inventory <>0 and if Are Items with Variants in Order or in other Use ?
Thanks.
Which Function can I Call or Modify so before Delete, it checks if they are Inventory <>0 and if Are Items with Variants in Order or in other Use ?
Thanks.
(Oo)=*=(oO)
0
Comments
-
I am afraid you have to write the code yourself. Something like:
rec32.RESET;
rec32.SETCURRENTKEY("Item No.","Variant Code");
rec32.SETRANGE("Item No.",'My Item No.');
rec32.SETRANGE("Variant Code",'My Variant Code');
rec32.CALCSUMS(Quantity);
IF rec32.Quantity <> 0 THEN
MESSAGE('Quantity is not 0');
If there is a quantity different from 0, you have to make item-postings to bring it to 0.
rec37.RESET;
rec37.SETCURRENTKEY(Type,"No.","Variant Code");
rec37.SETRANGE(Type,rec37.Type::Item);
rec37.SETRANGE("No.",'My Item No.');
rec37.SETRANGE("Variant Code",'My Variant Code');
IF rec37.FIND('-') THEN
MESSAGE('There are %1 records in table 37',rec37.COUNT);
and the same test for table 39.Regards,Alain Krikilion
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!0 -
Hmm. Perhaps it can be Use Form 342 (Check Avaibility) ...
I'm checking at time if i can use it...(Oo)=*=(oO)0 -
kriki wrote:I am afraid you have to write the code yourself. Something
and the same test for table 39.
Well , i have now Code myself ... the solution with the form 342 and CU 311 likes Nice, but its me at moment to complicated modify / add any source
8-[
Thanks for you answer and tipp(Oo)=*=(oO)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