Automatically populating another table

david.weeks
Member Posts: 96
I need some advice. Once a user has input a quote, another person will need to authorise this quote before they can make an order. My approach is to create a new table to hold the approval records.
Therefore, I have created a button called "confirm quote" within the quote form. I then need this to automatically populate key fields within my new table "Quote approval".
Can anyone assist me with this?
i.e. What approach do I follow to automatically populate another table once a button is clicked?
Thanks
Therefore, I have created a button called "confirm quote" within the quote form. I then need this to automatically populate key fields within my new table "Quote approval".
Can anyone assist me with this?
i.e. What approach do I follow to automatically populate another table once a button is clicked?
Thanks
0
Comments
-
Hello David,
Option 1
The easiest way would be to make an copy of the Sales Header / Sales Line table and the just use a tranferfields command to copy the records from one table to the other. But I have to say that this should only be done as a workaround seeing that you tend to double up on your data.
It also depends on what information you plan to store in the additional table.
Option 2
I'm going on the presumption that you are using sales quotes
Table 91 - User Table -> Add a boolean field to the user setup - "Confirm Quote". This would provide you with the abilty to insure that only certain users would be able to press the confirm button.
Table 36 - Add a couple of fields
Quote Confirmed - Boolean
Confirmed User - Code 20
Confirmed Date - Date
Confirmed Time - Time
CodeUnit 83 - "Sales-Quote to Order (Yes/No)" Add code to insure that if the Quote Confirmed field is not set to yes on the Sales Header that the Quote wil not be able to be processed to an order.
On this new button "Confirm Quote" add code to check on table 91 if the current user has permission to preform this action. If the user has the correct permission mark the Quote Confirmed field on the Sales Header.
The user,date and time field should be used to record which user and when the quote was confirmed. (Traceability)
Hope it helps
Best Regards
Rabe0 -
OR... you set user permissions on the "Release Sales Document" codeunit (number 414) and remove the code that automatically releases them. You don't always have to create new functionality
.
0
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