How to Create Sales Order and Post the Order automatically??

kishi_g
Member Posts: 162
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..
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
-
kishi_g wrote:
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...
yes you can see that order in a sale order form.kishi_g wrote: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?????
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 ?Experience Makes Man Perfect....
Rajesh Patel0 -
Hi Raj,
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...0 -
you can open sale order from by using this syntax
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.Experience Makes Man Perfect....
Rajesh Patel0 -
Hi Raj,
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...0 -
hi 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.Experience Makes Man Perfect....
Rajesh Patel0
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