Hi,
i do know navision (from a users point of view) quite well, but have no knowledge of C/AL whatsoever (unfortunatly)
I've written a .net application which (amongst user things) would allow the user to automatically complete components etc.
Right know this is done via a dataport (my application collects the data, provides the csv, opens a production order and calls the dataport vie a send-key shortcut for a button i put on the form. this is actually pretty failsave)
However, for "post components" i do pretty much the same thing - but i'm not really happy with the keysendstuff to post a lot of components. (though it works 90% reliably and i have some failsaves built in).
That is why i would really like to run the specific codeunit after the dataport is processed. i know WHERE and even more or less HOW to do it. What i do not know is how to pass the neccessary REC-value (Production header --> No., optionally multiple ) the importet dataport to the codeunit.
Can anybody help me? a rough hint would be nice, i'll try to digg in there myself then.
Thanks in Advance!
0
Comments
Create a function in the codeunit that has the production order as a parameter.
In that use the passed in parameter to get the production order and do your stuff.
Call this function from the dataport (perhaps one for each order).
i cannot change the codeunit (and if i could i wouldn't be able to do it properly (; )
but the codeunit already has the parameter.
My question is a) how to pass the parameter with the codunit.run command (i guess i have to declare a global variable with type record?)
b) how to tell the dataport to use the appropriate fields from the imported data for the codeunit parameter.
Of course you should fill your record fields with the values you want to use.