X++ logic to modify purchase order workflow submit process

Hello,

I am new to workflow frame work…
I have new requirement, that I have configured Purchase order workflow, currently when I submit the workflow it goes to one user for approval of entire PO gets approved with that user. till now its working fine.

My requirement is that, if PO has 5 lines with different procurement category, and when I submit the workflow, each PO Line has to go for the approval and all Approvers details are configured in custom form.

Now I am struct at 2 things …
1 .is how to loop the workflow submit for each PO line.
2. is how to pass approver from my custom form/table.

Please suggest any class or method where can I loop for each line and pass approvers from my custom table.

Please assist. where can I modify the code…

I am able to send approval notification by configuring PO line workflow and the added PO workflow by adding step that is to invoke Po line workflow…

Any suggestion, how can I pass the approver id through X++ after submitting PO?..I need to send approver Id when workflow submitting … Pls suggest any class or method where can I pass the approver