Hi,
I had one doubt in Navision. we create Sales Order by using code. But my doubt is first we will open the salesorder form by using form.run code.
after that i assign no.series and assign one customer in Sellto Cutomer field and assign some items to SalesLine tabel. All these data shall i see in SalesOrder form???
all this data comes from coding only. no manual interaction...
first i want to open the form and after that selltocutomer filed data will show and after items will show and finally it will post automatically.
Is it possible?????
Share ur ideas....
Thanks & Regards,
kishore..
0
Comments
yes you can see that order in a sale order form.
do u mean to say that you want to crate an order with coding then open it in sales order form then post it automatically ?
Rajesh Patel
I didnt open sales order form manually. I wrote the code in Codeunit and i run the codeunit. Then after shall i see all these process in Sales order form dynamically. Suppose in the codeunit i assigned sell to Cust is 10000, then will it show automatically in Sales Order form????
Thanks & Regards,
kishore...
but commit that insertion of an oder in both sales order and line.
then create another variable type of record eg.
saleshdr record sales header.
get that record by using setrange.
saleshder.setrange(saleshder."No.",your orderno);
if saleshdr.findfirst then begin
Form.RUNMODAL(form::Sales order form , saleshdr)
syntax :
Form.RUNMODAL(Number [, Record] [, Field])
hope it is clear.
Rajesh Patel
Thanks for ur reply. I want to see the data dynamically. In the Codeunit i use this code for open the Sales Order form.
Form.RUNMODAL(form::Sales order form , saleshdr)
then the form will appear. then after that line i assigned
Salesheader.No. := '1234';
Salesheader.selltocustomerNo := 'xxxx';
Is this data will appear in that Sales Order form dynamically.
Thanks & Regards,
kishore...
yes you will see your record on sales order form.
by the way, if your problem has solved then change the subject as [Solved] prefix with your title.
Rajesh Patel