Temporary Table Validation
JAYESH
Member Posts: 290
Hi all,
I am tring to insert records in the sales header and sales line table. I define this two table as temporary table on property.
The main purpose in my program is to validate all fields which I am inserting in this tables.
Program is not validating any fields when i am inserting records in this tables.
Can any one tell me what I am doing wrong ?
I am tring to insert records in the sales header and sales line table. I define this two table as temporary table on property.
The main purpose in my program is to validate all fields which I am inserting in this tables.
Program is not validating any fields when i am inserting records in this tables.
Can any one tell me what I am doing wrong ?
JAYESH PATEL
0
Answers
-
Calling VALIDATE or other triggers over temporary table is not recommanded, because this process can make changes in another tables and this can be big side-effect you do not want. Do not forget that. [-X0
-
My problem is,
When I am trying to insert records in the sales line table some times I got error, data is not validate. I am inserting sales Header records first and then sales line records.
What my porblem is, Sales header table is already used next no in no.series. I dont want to skip that invoice no. that's why I am tring to insert records in temp table then if everying works fine, its insert records in sales header and line table.
Do you have any other ideas ?JAYESH PATEL0 -
sounds to me you need to provide more info.
Are you using a dataport?
If so why can't you validate there?
How are you matching sales lines & headers?
does the sales lines know the correct document #?
what exactly is the error you get?0 -
If you take some no. and in same transaction is some error, the no. series will not be changed. If it is, there is some COMMIT in the transaction and this is your problem. You need to do all as one transaction. Than in cae of error all is rolled back to previous state and you do not have this problem.JAYESH wrote:My problem is,
When I am trying to insert records in the sales line table some times I got error, data is not validate. I am inserting sales Header records first and then sales line records.
What my porblem is, Sales header table is already used next no in no.series. I dont want to skip that invoice no. that's why I am tring to insert records in temp table then if everying works fine, its insert records in sales header and line table.
Do you have any other ideas ?0 -
Don't use TempRecord.validate(field,value), TempRecord.insert(true) if there is a No Series or other tables updated, TempREc.rename(), TemRec.modify(true), TempRec.delete(true) if there are other tables updated in these triggers. Also be sure, if you call functions in your temptable, that these function doesn't update other recs in other tables.
Search also the forum for temporary table and validate
RegardsDo you make it right, it works too!0 -
Thanks for the Information.JAYESH PATEL0
Categories
- All Categories
- 75 General
- 75 Announcements
- 66.7K Microsoft Dynamics NAV
- 18.8K 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
- 610 NAV Courses, Exams & Certification
- 1.9K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 251 Dynamics CRM
- 103 Dynamics GP
- 6 Dynamics SL
- 1.5K Other
- 991 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 28 Design Patterns (General & Best Practices)
- Architectural Patterns
- 9 Design Patterns
- 4 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1K General Chat
- 1.6K Website
- 77 Testing
- 1.2K Download section
- 23 How Tos section
- 249 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions
