a query

vijay_sr261982vijay_sr261982 Member Posts: 39
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.

](*,) ](*,)

Comments

  • MbadMbad Member Posts: 344
    This should be a report and not a pop-up, like its done in req. worksheet, calculate plan. There you will also get substitute items etc for free.
  • nrapendranrapendra Member Posts: 208
    u must try business notifications
    Nrapendra Singh
    (Sr. Tech. Consultant)
    Dataman Computer Systems (P) Ltd.
    web :www.datamannet.com
    mail :nrapendra@datamannet.com
  • HalMdyHalMdy Member Posts: 429
    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.

    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.
  • lubostlubost Member Posts: 623
    Your request can be done, but you must a bit change your logic:
    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.
  • ssinglassingla Member Posts: 2,973
    You should use a report which should display all the items which have inventory less than Reorder Qty.

    Though I would prefer using Req. Worksheet and Calculate Plan. You can create the purchase order directly from there.
    CA Sandeep Singla
    http://ssdynamics.co.in
  • vijay_sr261982vijay_sr261982 Member Posts: 39
    Thanks for all of u..........

    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).
  • themavethemave Member Posts: 1,058
    We do this sort-of, I took the report #699 that the req. worksheet uses, and modified it so that the dates are filled in as today + 20 days that way is orders.

    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
Sign In or Register to comment.