Skip to content


Required Fields on Non-Custom Node in SmartConnect

Kristen asked 7 years ago
Good Morning,
  We are using an out-of-the-box node from SmartConnect to import employee records to Microsoft Dynamics GP.  Is it possible to make a field within that node required in the source data?
Patrick Roth Staff answered 7 years ago
Yes and yes depending on what you mean by required.
If you mean required as in “the field has to be mapped in smartconnect”, then that is easy.  Just open the Node Maintenance window and open the particular node.  Then mark the ‘required’ checkbox.
Now in the SmartConnect UI, the field must be mapped.
But if you mean “required” as in “the field must contain data” then that is a bit more difficult
But even there, I can think of three ways to do it.
1. Use an eConnect pre/post proc
Edit the Pre or Post proc to add your business logic validation there.  This one is the “best” In that you can create your own custom error message to display for  your error.
Refer to the econnect documentation on how to do this
2. use a “map data check” task.
In it, I think you would create a custom table with a row in it that has a blank column.
in the sql validation task, you would set it to query that table/column and then set the ‘valid if’ to “no data exists”
then when the sql task runs, it should match up the blank source data to the blank record and now it ‘exists’ and the validation task should fail.
this would fail the entire integration and not just the specific record
haven’t tried this with a blank before however but i’d assume it would work.
3. create a ‘task that run before the document” script
This task runs before the document is sent to eConnect and so you can validate anything you like.  In this case, you’d validate the field wasn’t empty.  And if it was set the return to ‘false’ and SC will fail that document.  The only thing is that you can’t give a message – SC only reports task failure.
So in that case, perhaps name your task VALIDATE_FIELD_XXXXX so when that document fails then you would have an idea why.

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