Monday, August 5, 2013

Undocumented eConnect 2010 and 2013 Serialization Flags

By Steve Endow

I just fielded an eConnect question on the incredibly busy Microsoft Dynamics GP Community Forum about an issue with an eConnect vendor import.

The user was trying to set the Vendor Status field on imported vendors, but was unable to set the Status to Temporary.

I opened a .NET eConnect project and checked the properties of taUpdateCreateVendor object and I quickly found a likely suspect for the problem.

In eConnect 2010, the GP documentation and help team did a great job of restructuring the eConnect Help file to make it much easier to navigate.  However, for some reason, they also eliminated one small part of the help file:  the lists of the "serialization flags".

If you open the eConnect 10 help file and pull up the taUpdateCreateVendor record, you will see that some fields have little cross symbols next to them.  Those marks indicate that those fields have separate serialization flags.


At the bottom of the eConnect help page, there was a list of all of the serialization flags.


Once you knew about the serialization flags and knew to be on the lookout for them, this information wasn't terribly important.  Which might be why the serialization flag list was dropped in the eConnect 2010 help file.  But for those poor souls who were creating their first eConnect project in GP 2010 or 2013, this detail would not be at all obvious.

So what is a serialization flag and how to you use it?


I don't know the back story for why serialization flags were used in eConnect, but my guess is that it was to help reduce the complexity of the eConnect serialization code.  By having flags to indicate which less-common fields were being sent in, the code didn't have to evaluate certain values and could skip certain chunks of serialization by default.

In short, it's just a boolean property that you must include if you are setting the value of a corresponding eConnect field.

In this example, if you send in a value for Vendor Status, you must also send in the corresponding vendor status serialization flag.

With the serialization flag set to true, eConnect serialization will include the VNDSTTS field value in the XML that it generates.

Whenever you develop eConnect integrations, you need to pay attention to the intellisense to see if a property has a corresponding "Specified" property.  Since those properties are no longer indicated or listed in the eConnect help file, Intellisense is the only way that I know of to be aware of such properties in eConnect 2010 and 2013.


Steve Endow is a Dynamics GP Certified Trainer and Dynamics GP Certified IT Professional in Los Angeles.  He is also the owner of Precipio Services, which provides Dynamics GP integrations, customizations, and automation solutions.

You can also find him on Google+ and Twitter


2 comments:

TexasAndrew said...

Just out of curiosity, I checked out the eConnect taUpdateCreateVendorRcd class using .Net Reflector. I was somewhat surprised at the number of fields that use the 'Specified' functionality. For future reference, here is the list of all the properties:

string ACNMVNDR = ""
string ACPURACTNUMST = ""
string ADDRESS1 = ""
string ADDRESS2 = ""
string ADDRESS3 = ""
string CCode = ""
string CHEKBKID = ""
string CITY = ""
string COMMENT1 = ""
string COMMENT2 = ""
string COUNTRY = ""
short CreateAddress = 1
short CREDTLMT
bool CREDTLMTSpecified
decimal CRLMTDLR
bool CRLMTDLRSpecified
string CURNCYID = ""
short DISGRPER
bool DISGRPERSpecified
short DUEGRPER
bool DUEGRPERSpecified
string FAXNUMBR = ""
short FREEONBOARD
bool FREEONBOARDSpecified
short HOLD
bool HOLDSpecified
short KGLDSTHS
bool KGLDSTHSSpecified
short KPCALHST
bool KPCALHSTSpecified
short KPERHIST
bool KPERHISTSpecified
short KPTRXHST
bool KPTRXHSTSpecified
decimal MAXINDLR
bool MAXINDLRSpecified
decimal MINORDER
bool MINORDERSpecified
decimal MINPYDLR
bool MINPYDLRSpecified
decimal MINPYPCT
bool MINPYPCTSpecified
short MINPYTYP
bool MINPYTYPSpecified
short MXIAFVND
bool MXIAFVNDSpecified
decimal MXWOFAMT
bool MXWOFAMTSpecified
string NOTETEXT = ""
string PHNUMBR1 = ""
string PHNUMBR2 = ""
string PHNUMBR3 = ""
string PMAPACTNUMST = ""
string PMCSHACTNUMST = ""
string PMDAVACTNUMST = ""
string PMDTKACTNUMST = ""
string PMFINACTNUMST = ""
string PMFRTACTNUMST = ""
string PMMSCHACTNUMST = ""
string PMPRCHACTNUMST = ""
string PMTAXACTNUMST = ""
string PMTDSCACTNUMST = ""
string PMWRTACTNUMST = ""
short Post_Results_To
bool Post_Results_ToSpecified
short PTCSHACF
bool PTCSHACFSpecified
string PURPVACTNUMST = ""
string PYMNTPRI = ""
string PYMTRMID = ""
string RATETPID = ""
short RequesterTrx = 0
short Revalue_Vendor
bool Revalue_VendorSpecified
string SHIPMTHD = ""
string STATE = ""
string TAXSCHID = ""
short TEN99BOXNUMBER
bool TEN99BOXNUMBERSpecified
short TEN99TYPE
bool TEN99TYPESpecified
decimal TRDDISCT
bool TRDDISCTSpecified
string TXIDNMBR = ""
string TXRGNNUM = ""
short UpdateIfExists = 1
string UPSZONE = ""
string USERDEF1 = ""
string USERDEF2 = ""
short USERLANG
bool USERLANGSpecified
short UseVendorClass = 0
string USRDEFND1 = ""
string USRDEFND2 = ""
string USRDEFND3 = ""
string USRDEFND4 = ""
string USRDEFND5 = ""
string VADCDPAD = ""
string VADCDSFR = ""
string VADCDTRO = ""
string VADDCDPR = ""
string VENDNAME = ""
string VENDORID
string VENDSHNM = ""
short VENDSTTS
bool VENDSTTSSpecified
string VNDCHKNM = ""
string VNDCLSID = ""
string VNDCNTCT = ""
short WRITEOFF
bool WRITEOFFSpecified
string ZIPCODE = ""

Hope this helps someone in the future!

Steve Endow said...

I am puzzled about the reason for the Specified property in the first place, but I'm assuming / hoping that there is a good reason.

And yes, there are quite a few fields with serialization flags on some eConnect objects.

Just one of several Dynamics GP quirks!