0

I am exposing some Pages in Navision 2009 as web services. To update a record, you have to issue a Read request, and send the Key field along with your Update request.

I would rather calculate the Key myself for 2 reasons:

  1. Using the filters in the read request is awkward - a sql query would fit on one line.
  2. Performance is terrible.

I've been able to figure out that at least part of the key is a Base64 encoded string of the columns that make up the primary key. I hope that someone can tell me where to look (database, code base, docs, etc) to tell me how the Key is calculated.

5
  • If you dont't Read record how do you know it exists? If you want to modify it then it must be already in database.
    – Mak Sim
    Commented Jun 21, 2013 at 7:22
  • A SQL query, which is orders of magnitude more performant. Commented Jun 21, 2013 at 14:00
  • You want to insert with sql query and update with ws-call?
    – Mak Sim
    Commented Jun 24, 2013 at 5:47
  • No. I want to insert / update / delete with the web services and query with SQL. That's why I tagged the post 'CQRS' - The idea is you use one interface optimized for Commands - something that changes state - and another interface optimized for Queries - something that answers a question. Commented Jun 24, 2013 at 16:38
  • Maybe the rest of the key is SQL's timestamp?
    – Mak Sim
    Commented Jul 3, 2013 at 13:59

1 Answer 1

0

Sorry, I don't know how to calculate the key. Instead of calculating the key, have you considered doing your data manipulation in a codeunit instead, and exposing that codeunit as a webservice?

2
  • Doesn't make economic sense. We would have to purchase a developer license and then additional code units. Even if I were a C/AL developer, it would take several weeks doing it that way just to break even on cost. Commented Jun 20, 2013 at 16:42
  • Ah, I see. You may be right. On the other hand, since the algorithm for building the key is not documented anywhere, it may be subject to change without any prior notice from Microsoft?
    – Jan Hoek
    Commented Jul 1, 2013 at 7:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.