Can I auto-trigger a dataport on sales header update?

hello, I'm new and just wrote my first DataPort with some hello-world C/AL in NAV 2009 (updating is out of the question for the client).
Can I trigger my new DataPort to run every time a new Sales Header gets added or an existing one is edited and how?
Answers
-
Yes you can but the question is why you are on NAV 2009 version. Why not on Business central?
Thanks
Blog - rockwithnav.wordpress.com/
Twitter - https://twitter.com/RockwithNav
Facebook - https://facebook.com/rockwithnav/0 -
Can I trigger my new DataPort to run every time a new Sales Header gets added or an existing one is edited
That would mean every time an insert or modify is made on the sales header record or (most likely) if an insert, modify, or delete operation is carried out on any record that is related to the sales header, such as sales line, sales comment line, extended text, …
That is probably not what you want. So, first you need to think about the trigger condition, and probably remember that trigger event somewhere and create exports periodically, e.g. by creating a job in the job queue.
and how?
By adding code to the table triggers of any table that should serve as a trigger.
0 -
thanks for the hint! F9 in the table doesn't work (the menu item for C/AL Code is greyed out)
Is there a special licence required for table triggers?Yesterday I managed to get the Dataport to do what it should, so that's a small win
I see your point about the condition - at least it's going to be a good exercise.
I'm a bit flying in the dark as I only found a 4.0 version of the w1w1adgXXX.pdf file online (and no CD here) - if I could access that trigger, how would I instruct to "run Dataport number X now"?
0 -
Is there a special licence required for table triggers?
Yes, there are different levels of developper licenses. You should contact your NAV Partner to help you with what you do not have access to with your license.
Not sure what you can do. If you can design codeunits, implement everything there. Your parner can then verify your code and place calls to your functions in the triggers you do not have access to. But ask first, if he is willing to do that, and at what cost.
I'm a bit flying in the dark as I only found a 4.0 version of the w1w1adgXXX.pdf file online (and no CD here)
There is help in the development environment. Press F1 in the object designer or chose C/SIDE Reference Guide from the ?-Menu. This will tell you much of what you will need to know when it comes to C/AL. The system design did not change much between 4.0 and 2009, at least if you're on Classic(, which you probably are, if you are designing a Dataport. The RoleTailored client, as far as I know, does not support Dataports anymore. Instead there you must design an XMLPort, configured to handle flat files or csv files). So, the NAV 4 version of the Application Designer's Guide takes you a long way.
How things are done in NAV you learn best by reading existing code. For anything you want to do, ask yourself, where does NAV have something similar. Then go and analyze that. Use it as a pattern for your solution.
(and no CD here)
Did you mean you do not have the installation media for your productive version? If so, ask your NAV Partner, if he still has a version matching yours. I would consider this a must-have for your business. Also ask your IT guy. He might have copied it somewhere on a network drive for easy installations of new client PCs.
As a last resort, especially for documentation, you may try to download a version similar to yours. But don't just use it to install on some computer and then access your production version. You cannot downgrade, and to upgrade you likely need to convert the database and thus make it incompatible with your currently installd client and server software.
One source for a NAV 2009 installation media, including programmer's documentation, is right here on Mibuso: Microsoft Dynamics NAV W1 2009 R2
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
- 321 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