shelf/bin no.

sanjac
Member Posts: 3
Hello everybody,
I have on the first sight a simple question.
We are using the "shelf/bin no." for simple stockkeeping.
The problem is that the value in this field still is stored even the inventory = 0
As we are working with flexible warehouselocations this is very tricky.
Is there a way to set the value of "shelf/bin no. at '' as soon the inventory = 0.
I tried it with simple solutions as: if inventory = 0 then "self/bin no." := '' but the old
locationnumber comes back as soon the inventory <> 0.
I appriciate every suggetion
Thanks Dirk
I have on the first sight a simple question.
We are using the "shelf/bin no." for simple stockkeeping.
The problem is that the value in this field still is stored even the inventory = 0
As we are working with flexible warehouselocations this is very tricky.
Is there a way to set the value of "shelf/bin no. at '' as soon the inventory = 0.
I tried it with simple solutions as: if inventory = 0 then "self/bin no." := '' but the old
locationnumber comes back as soon the inventory <> 0.
I appriciate every suggetion
Thanks Dirk
0
Comments
-
Hello,
I tried a lot of ways to solve this problem and I found one, although it is not the most beautyfull one.
First is sorted out where the value of the inventory changes:
This is in codeunit 22, just above
.InsertItemReg(ItemLedgEntryNo : Integer;PhysInvtEntryNo : Integer;ValueEntryNo
I placed there the following code, (just after itemregentry.insert):
IF item.GET("Item No.") THEN
item.CALCFIELDS(Inventory); // find out if inv. = 0
IF item.Inventory = 0 THEN BEGIN
item.VALIDATE(item."Shelf/Bin No.",'');
END;
This triggers the Shelf/Bin No. - OnValidate() in table 21 (item)
there I placed this code
IF Rec."Shelf/Bin No." <> xRec."Shelf/Bin No." THEN
IF Inventory = 0 THEN BEGIN
"Shelf/Bin No.":='';
FORM.RUN(30,Rec,"Shelf/Bin No.");
END;
Finally the following code was placed in form 30 (item card) under Form - OnActivateForm()
CurrForm.UPDATE(TRUE);
IF artikel.GET(Rec."No.") THEN
CALCFIELDS(Inventory);
IF Inventory = 0 THEN "Shelf/Bin No." := '0000';
In this way the record with inventory = 0 gets an location nr. '0000'
But due to the Form.run statement the form 30 appears for every record and has to be remomed by esc.
My question now is: How can I avoid that?
Thanks
Dirk0
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