Specifying record Key field in web services

jmshinn
Member Posts: 3
I'm working on a data export to keep a website updated, and I'm building a table to act as a queue for any changes that occur that can then be grabbed and pulled out through webservices.
In order to make this as simple as possible, I'd like to record the Key field in my table whenever a table I'm interested in is updated, but I realize this key isn't really used directly in this way throughout the system. Is the Key field reliable? Is there a reason I should avoid using it in this way, and instead use the actual Primary Key fields set for that table, or can I use it to indicate that a particular record needs to be looked at? Does it ever change?
I should probably use the primary key fields anyway, since that's how I'm recording the reference on our web site (and it's the only way to handle record deletions anyway), but I'd like to understand more about the Key field, how it's used, and why it seems to be more of a background field than an actual primary key.
In order to make this as simple as possible, I'd like to record the Key field in my table whenever a table I'm interested in is updated, but I realize this key isn't really used directly in this way throughout the system. Is the Key field reliable? Is there a reason I should avoid using it in this way, and instead use the actual Primary Key fields set for that table, or can I use it to indicate that a particular record needs to be looked at? Does it ever change?
I should probably use the primary key fields anyway, since that's how I'm recording the reference on our web site (and it's the only way to handle record deletions anyway), but I'd like to understand more about the Key field, how it's used, and why it seems to be more of a background field than an actual primary key.
0
Answers
-
In further searching (and other questions), it looks like the "Key" field to which I'm referring is actually some sort of serialized representation of the actual primary key in concert, maybe, with a timestamp of the last update, which would mean each key is transient rather than a true primary key in the way I'm used to thinking about them, and thus not compatible with the way I'm talking about using it here.0
-
Yes, you are right. Key isn't really a field. That confused me also when I started to use NAV Web Services.
Btw, were you able to call the Delete (or Update) method of your NAV Web Service without calling the Read method beforehand? I mean you probably know the Primary Key of that record, but you're still not allowed to change it until you use the current "Key" value? Were you able to generate "Key" without calling the Read method?"Money is likewise the greatest chance and the greatest scourge of mankind."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