Search the GP Tables
Search by TABLE NAME
Search by FIELD NAME
These are our SOP scripts. All of our scripts for Dynamics GP can be found here
DynDeveloper.com

DynDeveloper.com

Sign Up Now!Log In
sgray128 4/21/2015 11:19:47 AM

eConnect - Copy a SOP document using reflection

* This article, and all our great eConnect documentation, Is available on the eConnect menu

I have the task today of copying a SOP Order. The user supplies the order that needs to be copied, I need to make a complete copy.

I have the standard SOP code documented here but I know that there is going to be a ton of manual typing to get all the 150 or so fields in each of the SOP header and lines eConnect documents populated. So, in order to avoid that hour of work, I spend a day working on .NET Reflection. <smiles>

My initial foray into reflection is here. The code is simpler and easier to understand if all you're looking for is Reflection.

The resulting code is below. Basically, we get a query of the SOP Header and then (using Reflection) loop through the eConnect taSOPHdrIvcInsert object and populate all the fields with the data from the order to be copied.

Then we repeat that with all the lines, and create the order.

 Send comments!

4Penny.net
Version: All
Section: eConnect






Table Definition Quick Links
All Tables
SOP Tables
RM Tables
GL Tables
POP Tables
HR Tables
PM Tables
UPR Tables
IV Tables
Olympic Tables