I am finding my self looking in front of a wall right now. I've started working with eConnect to communicate with Dynamic GP in order to access information.
I've come accross a questions that I have yet to see answered and I'm tired of searching all over the web and all over the bunch of documents I have. In case someone reads this I'll give you a few sources after my question so you can guide your self even if this post doesn't help you.
My question is how can I create a new PMClassMaster through C#? In the end its an XML file that you need to generate but I wonder if there is a method that does that for me? For example, to create a new Vendor you can do the following:
PMVendorMasterType vendorMasterType = new PMVendorMasterType();
vendorMasterType.eConnectProcessInfo = new eConnectProcessInfo();
vendorMasterType.eConnectProcessInfo.ConnectionString = dynamicGPcs;
vendorMasterType.taUpdateCreateVendorRcd = new taUpdateCreateVendorRcd();
vendorMasterType.taUpdateCreateVendorRcd.VENDORID = vendorGP.VENDORID;
vendorMasterType.taUpdateCreateVendorRcd.VENDNAME = vendorGP.VENDNAME;
vendorMasterType.taUpdateCreateVendorRcd.VENDSHNM = vendorGP.VENDSHNM;
//... etc...
PMVendorMasterType[] vendors = { vendorMasterType };
eConnect.PMVendorMasterType = vendors;
This will pretty much create an XML for you, because thats what GP recevies through eConnect's "CreateEntity" and "UpdateEntity" methods.
I can't seem to find the same for PMClassMaster which is the table that has all the Vendor Class IDs. Does anyone know the answer? For reference: https://www.gptablereference.com/2010/Table/PM00100
----- Sources for GP -----