How do I update a database record within a Method Directive? In my case it is a Post -Processing directive on the Erp.KanbanReceipts.ProcessKanbanReceipts method. How do I update the record of the PartLot table for the Company, Part and Lot from the ttKanbanReceipts dataset? I know I can do ttKanbanReceipts.EmployeeName = “Joe” but I don’t know the syntax to get to the PartLot table.
You may need to do it in a Pre-process method directive. But you want it to happen during the Post-process …
What you can do is create the Pre-process MD and add the condition so that it only happens when called from the specific post-proc MD. Then in the post-proc MD, put a call to the pre-proc. The flow would be:
Pre-Proc is trigger, but the condition that it was called from the Post-proc is false, so exit
Post-proc is trigger. It contains a call to run the Pre-Proc MD
Pre-Proc is trigger, and the condition that it was called from the Post-proc is true, so do your magic.
Bit confused here. Not saying that what you say won;t work but I want to update the field Status_c which is a UD field I added to the PartLot table. I just don’t the C# syntax to do the update?