Skip to content


Mulitple SOP Distributions – ignore blanks

Ryan Connolly asked 7 years ago
I am using Dynamics GP 2015 and SC 2014. I am trying to integrate SOP Invoices and am providing all the distributions in my source (SQL Table). The table has 1 invoice per row and 5 of the columns\fields are the various Account Distributions. I went into Node Maintenance and added 5 additional taSOPdistribution nodes so I can map the 5 possible Sales and the one RECV distribution. I receive an error when running the map that “Account does not exist”. I believe I am receiving this because each invoice\row would not have all 5 Sales distributions. Is there anyway to set it up to ignore distribution node if null?
Patrick Roth Staff answered 7 years ago
You would want to examine the error and the XML to determine if this is cause by an empty account or that the account does indeed not exist.  You should be able to see the account number passed in as part of the error message returned by eConnect.
But assuming you are correct in that it is just some are empty – then we can’t force eConnect to just ignore that line.
However if you go into your mapping for the distribution(s), go to the Restrictions button.
Here you could check for an empty account number.  So have the script check your field.
And if you want to send this distribution, return true.  otherwise return false and SC will just throw out this line from the eConnect XML.
Ryan replied 7 years ago

Thank you for the quick response. I checked the XML and it is passing a blank, not an invalid account number. Can you post a sample script for this Restriction and I can tailor to my fields? Thank you in advance.

If you would like to submit an answer or comment, please sign in to the eOne portal.