Hai all,
I had a query... In the master card there is a feild called "Re Order Quantity".
condition is if reorderqty is greater than or equal to inventory then imediately system should
pop up a message "Item shd be ordered". Suppose if inventory is > than system should automatically
create a PO.
i had tried by writing the coding in table level (in Item -27) under (Inventory - on validate).
coz, it shd get check when accessing inventory in other forms.
CODING :
ReorderLevel as decimal
reorderqty as decimal
CurrentQty as decimal
ReorderLevel := "Reorder Point";
reorderqty := "Reorder Quantity";
CurrentQty := Inventory;
IF Inventory <= ReorderLevel THEN MESSAGE('Item should be ordered...!!!');
But it not throwing message when ever inventory is less than Reorderqty.
Kimdly let me know am in the right way.
](*,) ](*,)
0
Comments
(Sr. Tech. Consultant)
Dataman Computer Systems (P) Ltd.
web :www.datamannet.com
mail :nrapendra@datamannet.com
Inventory is a flowfield. There is no advantage to put code behind because user never validates this field ...
As Mbad said, this field is used by Req. Worksheet, that's the engine of the reordering policy in Nav.
1. If you want to pop up message during browse cards, you should move your code to OnAfterGetCurrentRecord trigger on form.
2. If you don't want to pop up message during browse cards, you should create item on some existing button (or create new one) and move your code to OnPush trigger on it.
3. You must invoke CALCFIELDS(Inventory) before you want to use their value.
Though I would prefer using Req. Worksheet and Calculate Plan. You can create the purchase order directly from there.
http://ssdynamics.co.in
As per ur sugessions now am am doing this by creating a report.
let me describe actual requirement form my client.
1. Auto generation of POs of those items, which crosses reorder level.
System should check for those items ,in which that items are set to make PO auto.
Pls give some much sugesstions (to which i have to refer). (eg. Codeunit, Report).
Orderdate := today + 20 ;
todate := today + 20 ;
currTemplateName := 'REQ' ;
currWorksheetName := 'SF'; just a worksheet I have set up for this
this report is then ran from the job scheduler every night, so in the morning, the purchasing guy comes in opens the req worksheet named SF and he has everything ready to review, he reviews the worksheet and then does the "Carry out action message" which creats all the PO's.
it is simple and works well, with only a report required and no special programing
If you want it to run the carry out action message, you could make a modification to report 493, to defualt:
CurrTemplateName := 'REQ';
CurrWorksheetName := 'SF';
you could then also have this run after the first report in the job scheduler and it would all be automatic