using triggers in codeunit Sales-Quote to Order

EWKrebbers
Member Posts: 3
Hello,
I am developping an alternative for the Commerce portal.
everything works fine at last
.
We decided only allow inserting Quotes by customers using the website, and not allowing to insert Salesorders directly. Employees from the company can convert the quote to a salesorder.
Converting is done by the codeunit named : "Sales-Quote to Order"
We use a 2nd Database for the website, running on SQL Server 2000. When something is changed in Navision, we use the triggers to keep this database up to date by synchronizing the database, using the same technology as the commerce portal, by using the message queue.
Since the operation which converts a quote to a salesorder uses the codeunit Sales-Quote to Order, no triggers will run, and still, records from the "Sales header" table are deleted and inserted.
I looked into the codeunit and changed after every "modify" "delete(all)" and"insert" : "(TRUE)"
Then I tried again to convert a quote to a salesorder, but it didnt work, because of running some triggers.
So before the triggers will not being fired, and thus my 2nd database will not be synchonized. After modifying the codeunit, trigers will run, but it will give some conflicts, and it will not be possible to convert a quote into a salesorder. Maybe someone knows how to modify the "Sales-Quote to Order" unit the way it can serve both purposes....
Thanks in advance,
Eko Krebbers
I am developping an alternative for the Commerce portal.
everything works fine at last

We decided only allow inserting Quotes by customers using the website, and not allowing to insert Salesorders directly. Employees from the company can convert the quote to a salesorder.
Converting is done by the codeunit named : "Sales-Quote to Order"
We use a 2nd Database for the website, running on SQL Server 2000. When something is changed in Navision, we use the triggers to keep this database up to date by synchronizing the database, using the same technology as the commerce portal, by using the message queue.
Since the operation which converts a quote to a salesorder uses the codeunit Sales-Quote to Order, no triggers will run, and still, records from the "Sales header" table are deleted and inserted.
I looked into the codeunit and changed after every "modify" "delete(all)" and"insert" : "(TRUE)"
Then I tried again to convert a quote to a salesorder, but it didnt work, because of running some triggers.
So before the triggers will not being fired, and thus my 2nd database will not be synchonized. After modifying the codeunit, trigers will run, but it will give some conflicts, and it will not be possible to convert a quote into a salesorder. Maybe someone knows how to modify the "Sales-Quote to Order" unit the way it can serve both purposes....
Thanks in advance,
Eko Krebbers
0
Comments
-
Hi Eko,
This might work:
In the beginning of the codeunit that converts Quote to Order insert a delete for the quote in the message queue and after the sales order has been created, insert an insert for the order in the message queue table.
Also remember to convert the codeunit back to standard (without TRUE).
Christian0
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