If yes, then you would know that a few lines of code is not enough. You need event subscribers and to setup up your approval workflow. And a few more things.
May I suggest that you eventually check this blog post:
Then you most definitely should go through that blog post first. Working with workflows is not as easy to learn. Required both all this special code, and a lot of setup of the new workflows.
Yes you are new, no I will not do it for you, we will show you how you can learn to do it.
The work is not just done by adding a post button. I really recommend that you try out the example in that blog post i a separate database. It will give you a much better understanding of what it requires. And when you get that to work, then you can implement it in your own system. My guess is that it took me a day or so, to get my first workflow to work. But it requires that you already master the rest of NAV and understand all the concepts.
I really recommend that you find a place near you, where you could get a NAV developer “Master Class” or something similar. And that you follow NAV Skills free webinar about Dynamics NAV development. If not, then you can find the older episodes on youtube.
Introduction: Workflows are created in Dynamics NAV which when enabled perform a series of steps one after the other automatically and carry out actions as specified in the workflow. Workflow consi…