please help me

ATTAIN 3.01 (I have seen navision for the first time two months ago, and till now i’ve only made reports and some little changes in forms, tables, ecc.) Now I should add the following feature to the standard: when a order (sale) is posted and shipped, an order to the shipping agent should be automatically generated (practically the work of shipping should be ordered from the shipping agent) and the shipping price should be registered on the account of that shipping agent. The changes to calculate the price i’ve already done (in the customer table there is a new field with the approx. distance in km and behind the shipping agents is a new table with the cost/kg for e.g. 1-100km, 101-200km, ecc.). Now for the rest I have no idea even where to begin, is there some procedure in a codeunit that can make an order for me if i give the proper values? Or can you give some other tip, maybe also where i can find a document which explains which portions of c/al-code generate an order? (i am sorry for my horrible english, i hope you could understand what i did mean) thank you

It’s a bit depending on the way you would like to create the (purchase) order, but why not let Navision do the hard work for you? Create a Requisition Worksheet template (give it the name of this shipping agent for easy recognition). Then you just need to insert a line to the Req. Worksheet (t246) and after collecting all the shipments (per day, week, or whatever time-frame), you call the standard method of creating a Purchase Order (Functions, Carry Out Action Message) from the Req. Worksheet form. You may want to modify report 698 (Get Sales Orders) to find the sales lines containing the shipping costs automatically. John

Hi Martin You are using 3.01 Attain so! Have a look at the new Sales and Purchase Line type “Charge (Item)” this allows you to create charges against the lines of aother document. Calculate the “Shipping Charges” in a codeunit or function then apply by percentage the charges to the lines, then you have better “total Sales” and “Cost of Sales” as well! David Cox email: Edited by - David Cox on 2002 Feb 19 16:20:26