Friday, November 12, 2010

Dynamics GP eConnect - How to blank out a field Through eConnect with existing data

One of the nicest thing on Dynamics GP eConnect turned out to be a big issue for me in one my implementation. Dynamics GP eConnect is very smart enough when NULL, blank, NOTMAPPED is passed thorugh XML schema to eConnect, it simply pick existing value or Default value from master setup. This saves lot of pain when we don't want to pass all the values in eConnect XML node.

I had a unique request from a client who wants the ability to blank out some of the fields e.g. Address details during Customer address migration through eConnect.
I tried out different options like passing Address Node as NULL, Blank and every thing went in vain.

Then practically left out with a option of writing a post procedure, where i need to check each field which is passed as blank, update it in SQL and need to be watch full with Default values set for the Field in SQL.

Then, CDATA Tag came for my rescue,

<ADDRESS3><![CDATA[ ]]></ADDRESS3>

Dynamics GP eConnect ability to blank out fields used to depend on what the default was for the field in the procedure (null or '')and only the null defaults could be cleared.
However, with passing a CDATA tag with a single space I was able to blank out fields regardless of the default in SQL.

No comments:

Post a Comment